summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-23 18:40:22 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-23 18:41:49 +0100
commit9eb900ee6017d19d523f27d780d756cefc2b72fd (patch)
treecb3becee270fe46bd7d7b04a3271a57b15f46960
parentbuild(flake): Use treefmt as nix formatter (diff)
downloadnixos-server-9eb900ee6017d19d523f27d780d756cefc2b72fd.tar.gz
nixos-server-9eb900ee6017d19d523f27d780d756cefc2b72fd.zip
style(treewide): Format
-rw-r--r--.envrc6
-rw-r--r--cog.toml10
-rw-r--r--modules/by-name/gi/git-server/css.nix5
-rw-r--r--notes/deploy.md2
-rw-r--r--notes/passwords.md2
-rw-r--r--notes/taskserver.md2
-rw-r--r--pkgs/by-name/ba/back/README.md1
-rw-r--r--pkgs/by-name/ba/back/flake.nix1
-rw-r--r--pkgs/by-name/ba/back/src/issues/mod.rs4
-rw-r--r--system/services/taskserver/certs/README.md9
-rw-r--r--tests/README.md2
11 files changed, 28 insertions, 16 deletions
diff --git a/.envrc b/.envrc
index a9c7e4e..19a0dd1 100644
--- a/.envrc
+++ b/.envrc
@@ -1,5 +1,7 @@
+#! /usr/bin/env sh
+
 use flake
 if on_git_branch; then
-  echo && git status --short --branch &&
-  echo && git fetch --verbose
+    echo && git status --short --branch &&
+        echo && git fetch --verbose
 fi
diff --git a/cog.toml b/cog.toml
index 6f5f747..6528379 100644
--- a/cog.toml
+++ b/cog.toml
@@ -4,16 +4,14 @@ ignore_merge_commits = false
 pre_package_bump_hooks = []
 post_package_bump_hooks = []
 
-branch_whitelist = [
-  "main",
-]
+branch_whitelist = ["main"]
 
 pre_bump_hooks = [
-    "nix flake check", # verify the project builds
+  "nix flake check", # verify the project builds
 ]
 post_bump_hooks = [
-    "git push",
-    "git push origin v{{version}}", # push the new tag to origin
+  "git push",
+  "git push origin v{{version}}", # push the new tag to origin
 ]
 
 [commit_types]
diff --git a/modules/by-name/gi/git-server/css.nix b/modules/by-name/gi/git-server/css.nix
index 3d73ea0..7d0ad06 100644
--- a/modules/by-name/gi/git-server/css.nix
+++ b/modules/by-name/gi/git-server/css.nix
@@ -1,4 +1,7 @@
-{cgitPkg, pkgs}: let
+{
+  cgitPkg,
+  pkgs,
+}: let
   /*
   Adapted from `https://git.qyliss.net/nixlib/sys/atuin.nix`, originally distributed under
   the MIT license.
diff --git a/notes/deploy.md b/notes/deploy.md
index 61dcbfc..2b274b5 100644
--- a/notes/deploy.md
+++ b/notes/deploy.md
@@ -1,5 +1,7 @@
 # Full redeployment
+
 After a complete server purge just load up the newest NixOS ISO, set the root password and run:
+
 ```bash
 ipv4_address=$(dig +short "<hostname>"); # ipv6 seems to fail in this context
 nix run github:numtide/nixos-anywhere -- --flake .#<hostname> root@"$ipv4_address"
diff --git a/notes/passwords.md b/notes/passwords.md
index a26bc3e..d092782 100644
--- a/notes/passwords.md
+++ b/notes/passwords.md
@@ -1,6 +1,8 @@
 # Passwords
+
 These are created by running (and leaving everything to the default values, as we assume
 they are sound):
+
 ```sh
 openssl rand -hex 64 | mkpasswd --password-fd=0 | wl-copy
 ```
diff --git a/notes/taskserver.md b/notes/taskserver.md
index 36aeff0..04d5cd1 100644
--- a/notes/taskserver.md
+++ b/notes/taskserver.md
@@ -1,5 +1,7 @@
 # User export
+
 Use
+
 ```bash
 nixos-taskserver user export my-company alice
 # or via ssh
diff --git a/pkgs/by-name/ba/back/README.md b/pkgs/by-name/ba/back/README.md
index 350abee..59f9d9a 100644
--- a/pkgs/by-name/ba/back/README.md
+++ b/pkgs/by-name/ba/back/README.md
@@ -16,6 +16,7 @@ If not, see <https://www.gnu.org/licenses/agpl.txt>.
 > An extremely simple git issue tracking system. Inspired by tvix's panettone.
 
 ## Usage
+
 Currently `back` only visualizes a `git-bug` repository. As such it takes exactly one
 argument, being the repository to visualize.
 The server is than started at `http://127.0.0.1:8000` and provides access to the issues
diff --git a/pkgs/by-name/ba/back/flake.nix b/pkgs/by-name/ba/back/flake.nix
index 2b67207..b7e158e 100644
--- a/pkgs/by-name/ba/back/flake.nix
+++ b/pkgs/by-name/ba/back/flake.nix
@@ -8,7 +8,6 @@
 #
 # You should have received a copy of the License along with this program.
 # If not, see <https://www.gnu.org/licenses/agpl.txt>.
-
 {
   description = "An extremely simple git issue tracking system. Inspired by tvix's panettone";
 
diff --git a/pkgs/by-name/ba/back/src/issues/mod.rs b/pkgs/by-name/ba/back/src/issues/mod.rs
index e2af5de..df3e57e 100644
--- a/pkgs/by-name/ba/back/src/issues/mod.rs
+++ b/pkgs/by-name/ba/back/src/issues/mod.rs
@@ -12,8 +12,8 @@
 use std::path::Path;
 
 use crate::issues::issue::{Issue, Status};
-use issue_show::BackPrefix;
 use gix::{refs::Target, Repository};
+use issue_show::BackPrefix;
 use rocket::{
     get,
     response::content::{RawCss, RawHtml},
@@ -21,9 +21,9 @@ use rocket::{
 
 use crate::REPOSITORY;
 
+mod format;
 mod issue;
 mod issue_show;
-mod format;
 
 #[get("/style.css")]
 pub fn styles() -> RawCss<String> {
diff --git a/system/services/taskserver/certs/README.md b/system/services/taskserver/certs/README.md
index 846379c..8ff0e44 100644
--- a/system/services/taskserver/certs/README.md
+++ b/system/services/taskserver/certs/README.md
@@ -24,7 +24,9 @@ and cert will not be trusted by anyone, for good reasons.
 
 Note, you can inspect any cert with the command:
 
-    $ gnutls-certtool -i --infile $CERT
+```
+$ gnutls-certtool -i --infile $CERT
+```
 
 There is a 'generate' script here that will perform the above steps.  Take a
 look at it to see the individual steps it takes to generate the proper set of
@@ -35,5 +37,6 @@ chosen parameters.
 
 Validate a certificate with:
 
-    $ gnutls-certtool --verify --infile client.cert.pem --load-ca-certificate ca.cert.pem
-
+```
+$ gnutls-certtool --verify --infile client.cert.pem --load-ca-certificate ca.cert.pem
+```
diff --git a/tests/README.md b/tests/README.md
index 0ff5738..7811f32 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -1,6 +1,6 @@
 # Tests
 
 This directory tree mirrors the modules defined in the
-[modules](`../modules/`) directory.  Each module should have at least
+[modules](%60../modules/%60) directory.  Each module should have at least
 one test in the mirrored directory, effectively replacing the module's
 `module.nix` file.