about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--flake.lock180
-rw-r--r--flake.nix19
-rw-r--r--lib/default.nix10
-rw-r--r--modules/common/common/nix/default.nix25
-rw-r--r--modules/common/common/nix/patches/vesktop-no-anime.patch17
-rw-r--r--modules/common/common/shell/default.nix4
-rw-r--r--modules/common/emacs/doom/config.el3
-rw-r--r--modules/common/emacs/doom/init.el1
-rw-r--r--modules/common/mpv.nix1
-rw-r--r--modules/common/qutebrowser.nix5
-rw-r--r--modules/nixos/beets.nix3
-rw-r--r--modules/nixos/common/nix.nix2
-rw-r--r--modules/nixos/firefox/default.nix1
-rw-r--r--modules/nixos/git/default.nix25
-rw-r--r--nixosConfigurations/manwe/webserver.nix79
15 files changed, 278 insertions, 97 deletions
diff --git a/flake.lock b/flake.lock
index bcd1690..b41b4aa 100644
--- a/flake.lock
+++ b/flake.lock
@@ -140,6 +140,48 @@
         "type": "gitlab"
       }
     },
+    "chaotic": {
+      "inputs": {
+        "compare-to": "compare-to",
+        "flake-schemas": "flake-schemas",
+        "home-manager": [
+          "home-manager"
+        ],
+        "nixpkgs": [
+          "nixpkgs"
+        ],
+        "systems": "systems",
+        "yafas": "yafas"
+      },
+      "locked": {
+        "lastModified": 1698579684,
+        "narHash": "sha256-UCvgUGogz0CFdpxM6J10BmptO82fiapB6TR+uoeRdy4=",
+        "owner": "chaotic-cx",
+        "repo": "nyx",
+        "rev": "4934721bdcce4574f82449a0c669c907e701cc6b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "chaotic-cx",
+        "ref": "main",
+        "repo": "nyx",
+        "type": "github"
+      }
+    },
+    "compare-to": {
+      "locked": {
+        "lastModified": 1695341185,
+        "narHash": "sha256-htO6DSbWyCgaDkxi7foPjXwJFPzGjVt3RRUbPSpNtZY=",
+        "rev": "98b8e330823a3570d328720f87a1153f8a7f2224",
+        "revCount": 2,
+        "type": "tarball",
+        "url": "https://api.flakehub.com/f/pinned/chaotic-cx/nix-empty-flake/0.1.2%2Brev-98b8e330823a3570d328720f87a1153f8a7f2224/018aba35-d228-7fa9-b205-7616c89ef4e0/source.tar.gz"
+      },
+      "original": {
+        "type": "tarball",
+        "url": "https://flakehub.com/f/chaotic-cx/nix-empty-flake/0.1.2.tar.gz"
+      }
+    },
     "darwin": {
       "inputs": {
         "nixpkgs": [
@@ -147,11 +189,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1697723594,
-        "narHash": "sha256-W7lTC+kHGS1YCOutGpxUHF0cK66iY/GYr3INaTyVa/I=",
+        "lastModified": 1698429334,
+        "narHash": "sha256-Gq3+QabboczSu7RMpcy79RSLMSqnySO3wsnHQk4DfbE=",
         "owner": "LnL7",
         "repo": "nix-darwin",
-        "rev": "19f75c2b45fbfc307ecfeb9dadc41a4c1e4fb980",
+        "rev": "afe83cbc2e673b1f08d32dd0f70df599678ff1e7",
         "type": "github"
       },
       "original": {
@@ -202,27 +244,6 @@
         "type": "github"
       }
     },
-    "flake-parts": {
-      "inputs": {
-        "nixpkgs-lib": [
-          "nixpkgs"
-        ]
-      },
-      "locked": {
-        "lastModified": 1696343447,
-        "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=",
-        "owner": "hercules-ci",
-        "repo": "flake-parts",
-        "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4",
-        "type": "github"
-      },
-      "original": {
-        "owner": "hercules-ci",
-        "ref": "main",
-        "repo": "flake-parts",
-        "type": "github"
-      }
-    },
     "flake-registry": {
       "flake": false,
       "locked": {
@@ -240,9 +261,23 @@
         "type": "github"
       }
     },
+    "flake-schemas": {
+      "locked": {
+        "lastModified": 1697467827,
+        "narHash": "sha256-j8SR19V1SRysyJwpOBF4TLuAvAjF5t+gMiboN4gYQDU=",
+        "rev": "764932025c817d4e500a8d2a4d8c565563923d29",
+        "revCount": 29,
+        "type": "tarball",
+        "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.2/018b3da8-4cc3-7fbb-8ff7-1588413c53e2/source.tar.gz"
+      },
+      "original": {
+        "type": "tarball",
+        "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/0.1.1.tar.gz"
+      }
+    },
     "flake-utils": {
       "inputs": {
-        "systems": "systems"
+        "systems": "systems_2"
       },
       "locked": {
         "lastModified": 1694529238,
@@ -287,11 +322,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1698128422,
-        "narHash": "sha256-Qf39ATHrj6wfeC+K6uwD/FnI7RKrdEiN3uWaciUi0rM=",
+        "lastModified": 1698479159,
+        "narHash": "sha256-rJHBDwW4LbADEfhkgGHjKGfL2dF44NrlyXdXeZrQahs=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "6045b68ee725167ed0487f0fb88123202ba61923",
+        "rev": "f92a54fef4eacdbe86b0a2054054dd58b0e2a2a4",
         "type": "github"
       },
       "original": {
@@ -330,11 +365,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1698161642,
-        "narHash": "sha256-4Mp9Rgg1+E8op8O1oTlAS54z7M/BbeQo4Y2QxxZlVUw=",
+        "lastModified": 1698471646,
+        "narHash": "sha256-+1c4oNDPUtT4iuipUvmw/4xaTKT7zLMgSYqZx8R6icg=",
         "owner": "Infinidoge",
         "repo": "nix-minecraft",
-        "rev": "f1c70ba2a191d8928d2fe6ac8ef3fa82e505d2f0",
+        "rev": "0581ffbd2fbc223edf1baae72efbf7f96f190d0a",
         "type": "github"
       },
       "original": {
@@ -357,11 +392,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1698110344,
-        "narHash": "sha256-YGixbIoBA8OrW5ZSzNJ/hNz3uVTWk5A0/GmH2rxpI+E=",
+        "lastModified": 1698455861,
+        "narHash": "sha256-qCG2FqdCpJFTdwRzH4CfYUIwyXdLXH+mbkWTJv4wz5k=",
         "owner": "nix-community",
         "repo": "nix-vscode-extensions",
-        "rev": "9b37cc71f2d9fdbd6ab1796133fea747fa2c9ed2",
+        "rev": "ccb2cfa4b140dd2a535c01488c42387d51b8c928",
         "type": "github"
       },
       "original": {
@@ -389,11 +424,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1697915759,
-        "narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=",
+        "lastModified": 1698336494,
+        "narHash": "sha256-sO72WDBKyijYD1GcKPlGsycKbMBiTJMBCnmOxLAs880=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "51d906d2341c9e866e48c2efcaac0f2d70bfd43e",
+        "rev": "808c0d8c53c7ae50f82aca8e7df263225cf235bf",
         "type": "github"
       },
       "original": {
@@ -405,11 +440,11 @@
     },
     "nixpkgs-master": {
       "locked": {
-        "lastModified": 1698178197,
-        "narHash": "sha256-1/X3YW444tGIKyTXGYPaRwYDxZrU/KuRbYgIKJSUt+o=",
+        "lastModified": 1698514468,
+        "narHash": "sha256-7+aObQOccWS5hQND/GKw2RXJo3XoYqC1Ep2gLBq7sYk=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "955525b515f43c1f356ebaab40b0b794c67e0e48",
+        "rev": "d59ba91d5a8687a8872ce4941ef23533fc2aa009",
         "type": "github"
       },
       "original": {
@@ -421,11 +456,11 @@
     },
     "nixpkgs-stable": {
       "locked": {
-        "lastModified": 1698160471,
-        "narHash": "sha256-lH7ZEItqQOWi21St9JyE6t3yyFNYGoQqSEcS90WMnBY=",
+        "lastModified": 1698501290,
+        "narHash": "sha256-2fsEjktglg903ssQvFRXNSnjxky1D+LxVSMVzD2c8fo=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "04f431fe64a5ba8ff129cbbbfec489cfe903982c",
+        "rev": "755f966284752c695e6e64c996891eab2ff7fffa",
         "type": "github"
       },
       "original": {
@@ -449,11 +484,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1698063089,
-        "narHash": "sha256-fJRcsO+KHf0K04fRHIS6HETJRWMakTNbUaWx8WeYHX4=",
+        "lastModified": 1698504351,
+        "narHash": "sha256-/bj7Sy32j2HPtIuwjV94ZqF3A8A3CIouOngz8pdMn2I=",
         "owner": "nix-community",
         "repo": "nixvim",
-        "rev": "0c5dcb56d105addedd001f043e6a32ab9f1abe92",
+        "rev": "9004ffe32f68bb9cc3e5907bdb55ceccddca44a0",
         "type": "github"
       },
       "original": {
@@ -499,11 +534,11 @@
     },
     "nur": {
       "locked": {
-        "lastModified": 1698176069,
-        "narHash": "sha256-rjncD+8c3znRZDOB6hugRwMingBHvIz2jtTFCSiMkSk=",
+        "lastModified": 1698513999,
+        "narHash": "sha256-JFWbAmExdWkghvKLjbNdWq2oNyrg5qcxTcCHrN1MTeA=",
         "owner": "nix-community",
         "repo": "NUR",
-        "rev": "c4231705e51c32a83297ebb7bc88da0e87fe4ba5",
+        "rev": "984c4715454a4f5fdd753a1b667893c206729ab5",
         "type": "github"
       },
       "original": {
@@ -559,11 +594,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1697746376,
-        "narHash": "sha256-gu77VkgdfaHgNCVufeb6WP9oqFLjwK4jHcoPZmBVF3E=",
+        "lastModified": 1698227354,
+        "narHash": "sha256-Fi5H9jbaQLmLw9qBi/mkR33CoFjNbobo5xWdX4tKz1Q=",
         "owner": "cachix",
         "repo": "pre-commit-hooks.nix",
-        "rev": "8cc349bfd082da8782b989cad2158c9ad5bd70fd",
+        "rev": "bd38df3d508dfcdff52cd243d297f218ed2257bf",
         "type": "github"
       },
       "original": {
@@ -579,10 +614,10 @@
         "alertmanager-ntfy": "alertmanager-ntfy",
         "arkenfox-nixos": "arkenfox-nixos",
         "azahi-cc": "azahi-cc",
+        "chaotic": "chaotic",
         "darwin": "darwin",
         "dns-nix": "dns-nix",
         "flake-compat": "flake-compat",
-        "flake-parts": "flake-parts",
         "flake-registry": "flake-registry",
         "flake-utils": "flake-utils",
         "gitignore": "gitignore",
@@ -639,6 +674,21 @@
     },
     "systems": {
       "locked": {
+        "lastModified": 1689347949,
+        "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
+        "owner": "nix-systems",
+        "repo": "default-linux",
+        "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default-linux",
+        "type": "github"
+      }
+    },
+    "systems_2": {
+      "locked": {
         "lastModified": 1681028828,
         "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
         "owner": "nix-systems",
@@ -690,6 +740,30 @@
         "type": "git",
         "url": "https://git.azahi.cc/xmonad-ng"
       }
+    },
+    "yafas": {
+      "inputs": {
+        "flake-schemas": [
+          "chaotic",
+          "flake-schemas"
+        ],
+        "systems": [
+          "chaotic",
+          "systems"
+        ]
+      },
+      "locked": {
+        "lastModified": 1695926485,
+        "narHash": "sha256-wNFFnItckgSs8XeYhhv8vlJs2WF09fSQaWgw4xkDqHQ=",
+        "rev": "7772afd6686458ca0ddbc599a52cf5d337367653",
+        "revCount": 4,
+        "type": "tarball",
+        "url": "https://api.flakehub.com/f/pinned/UbiqueLambda/yafas/0.1.4%2Brev-7772afd6686458ca0ddbc599a52cf5d337367653/018add18-ebb4-72c6-93fe-d1d8da361703/source.tar.gz"
+      },
+      "original": {
+        "type": "tarball",
+        "url": "https://flakehub.com/f/UbiqueLambda/yafas/0.1.0.tar.gz"
+      }
     }
   },
   "root": "root",
diff --git a/flake.nix b/flake.nix
index ed64cd7..5aa98a9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -49,6 +49,17 @@
       ref = "master";
     };
 
+    chaotic = {
+      type = "github";
+      owner = "chaotic-cx";
+      repo = "nyx";
+      ref = "main";
+      inputs = {
+        home-manager.follows = "home-manager";
+        nixpkgs.follows = "nixpkgs";
+      };
+    };
+
     darwin = {
       type = "github";
       owner = "LnL7";
@@ -168,14 +179,6 @@
       ref = "main";
     };
 
-    flake-parts = {
-      type = "github";
-      owner = "hercules-ci";
-      repo = "flake-parts";
-      ref = "main";
-      inputs.nixpkgs-lib.follows = "nixpkgs";
-    };
-
     flake-registry = {
       type = "github";
       owner = "NixOS";
diff --git a/lib/default.nix b/lib/default.nix
index 4251f7e..be32e60 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -28,11 +28,19 @@ lib: _: rec {
     assert min <= ini && ini <= max;
       lib.concatMapStrings (x: toString x + " ") (map (pow 2) [min ini max]);
 
-  # TODO Move this to the NGINX module.
+  # TODO Move these to the NGINX module.
   nginxInternalOnly = ''
     if ($internal != 1) {
       return 403;
     }
     access_log off;
   '';
+  nginxAppendHead = text: ''
+    sub_filter '</head>' '${lib.concatStrings text}</head>';
+    sub_filter_once on;
+  '';
+  htmlPlausibleScript = {
+    domain ? "$host",
+    src ? "https://plausible.shire.net/js/script.js",
+  }: ''<script defer data-domain="${domain}" src="${src}"></script>'';
 }
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix
index ab29039..8a684c5 100644
--- a/modules/common/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -4,6 +4,7 @@
   lib,
   localUsername ? lib.my.username,
   pkgs,
+  pkgsPr,
   this,
   ...
 }:
@@ -83,6 +84,7 @@ with lib; {
   nixpkgs.overlays = with inputs; [
     self.overlays.default
     nur.overlay
+    chaotic.overlays.default
     (
       _: super: {
         grc = super.grc.overrideAttrs (_: final: {
@@ -128,7 +130,7 @@ with lib; {
           });
 
         telegram-desktop =
-          (super.telegram-desktop.override (finalAttrs: {
+          (super.telegram-desktop_git.override (finalAttrs: {
             stdenv = pkgs.useMoldLinker finalAttrs.stdenv;
           }))
           .overrideAttrs (_: final: {
@@ -138,6 +140,27 @@ with lib; {
                 ./patches/telegram-desktop-no-ads.patch
               ];
           });
+
+        vesktop = (pkgsPr 263752 "sha256-LAWBE8au4ajSPPksF9rr3ddYCMctzx1FA75r2TCGbXc=").vesktop.overrideAttrs (_: final: {
+          nativeBuildInputs = final.nativeBuildInputs ++ [super.imagemagick];
+          patches =
+            final.patches
+            ++ [
+              ./patches/vesktop-no-anime.patch
+            ];
+          postInstall = ''
+            # Replace gay icons with the default one. Apparently, these were
+            # designed specifically for MacOS[1]. You can't make this shit up
+            # LMAO.
+            #
+            # [1]: https://github.com/Vencord/Vesktop/pull/48
+            rm -rf $out/share/icons/hicolor/*
+            for size in 16 24 32 48 64 96; do
+              convert -scale $size icon.png $size.png
+              install -Dm644 $size.png $out/share/icons/hicolor/''${size}x''${size}/apps/vencorddesktop.png
+            done
+          '';
+        });
       }
     )
   ];
diff --git a/modules/common/common/nix/patches/vesktop-no-anime.patch b/modules/common/common/nix/patches/vesktop-no-anime.patch
new file mode 100644
index 0000000..5fd97ef
--- /dev/null
+++ b/modules/common/common/nix/patches/vesktop-no-anime.patch
@@ -0,0 +1,17 @@
+diff --git i/static/views/splash.html w/static/views/splash.html
+index 7cb571b..519c0f6 100644
+--- i/static/views/splash.html
++++ w/static/views/splash.html
+@@ -30,12 +30,6 @@
+ 
+ <body>
+     <div class="wrapper">
+-        <img
+-            draggable="false"
+-            src="../shiggy.gif"
+-            alt="shiggy"
+-            role="presentation"
+-        />
+         <p>Loading Vesktop...</p>
+     </div>
+ </body>
diff --git a/modules/common/common/shell/default.nix b/modules/common/common/shell/default.nix
index be86bd8..c3c29de 100644
--- a/modules/common/common/shell/default.nix
+++ b/modules/common/common/shell/default.nix
@@ -31,6 +31,7 @@ with lib; {
         initExtra = ''
           set -o notify
 
+          # Apropriated from the default NixOS prompt settings.
           if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
             PROMPT_COLOR="1;31m"
             ((UID)) && PROMPT_COLOR="1;32m"
@@ -46,9 +47,12 @@ with lib; {
 
           ${readFile ./functions.bash}
 
+          # Colourise certain programs' outputs.
           GRC_ALIASES=true
           source ${pkgs.grc}/etc/profile.d/grc.sh
 
+          # This makes sure we always source these tweaks for both interactive
+          # and login sessions.
           if [ -z "$_PROFILE_SOURCED" ] && [ -f "$HOME/.profile" ]; then
             source "$HOME/.profile"
           fi
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index 0000679..6095c40 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -26,7 +26,8 @@
 ;;; LSP
 ;;
 
-(setq lsp-enable-suggest-server-download nil)
+(setq lsp-enable-suggest-server-download nil
+      lsp-file-watch-threshold 512)
 
 ;;
 ;;; Org
diff --git a/modules/common/emacs/doom/init.el b/modules/common/emacs/doom/init.el
index 21b10c7..4399f05 100644
--- a/modules/common/emacs/doom/init.el
+++ b/modules/common/emacs/doom/init.el
@@ -77,6 +77,7 @@
        (cc +lsp +tree-sitter)
        (common-lisp +lsp +tree-sitter)
        data
+       (dhall +lsp +tree-sitter)
        (emacs-lisp +lsp +tree-sitter)
        (go +lsp +tree-sitter)
        (:if IS-LINUX (haskell +lsp +tree-sitter))
diff --git a/modules/common/mpv.nix b/modules/common/mpv.nix
index a44e9ca..37fbe4c 100644
--- a/modules/common/mpv.nix
+++ b/modules/common/mpv.nix
@@ -18,7 +18,6 @@ in {
           wrapMpv mpv-unwrapped {
             scripts = with mpvScripts; [
               autoload
-              mpv-autosub
               sponsorblock
             ];
           };
diff --git a/modules/common/qutebrowser.nix b/modules/common/qutebrowser.nix
index 9484ce1..e59917b 100644
--- a/modules/common/qutebrowser.nix
+++ b/modules/common/qutebrowser.nix
@@ -13,11 +13,6 @@ in {
     hm.programs.qutebrowser = with config.nixfiles.modules; {
       enable = true;
 
-      package = pkgs.qutebrowser.override {
-        withMediaPlayback = false;
-        withPdfReader = false;
-      };
-
       keyBindings.normal = mkIf mpv.enable {
         "z" = let
           mpv = "${config.hm.programs.mpv.package}/bin/mpv";
diff --git a/modules/nixos/beets.nix b/modules/nixos/beets.nix
index ccceaeb..f01e412 100644
--- a/modules/nixos/beets.nix
+++ b/modules/nixos/beets.nix
@@ -1,6 +1,7 @@
 {
   config,
   lib,
+  pkgs,
   ...
 }:
 with lib; let
@@ -27,6 +28,8 @@ in {
         beets = {
           enable = true;
 
+          package = pkgs.beets-unstable;
+
           settings = {
             library = "${beetsdir}/library.db";
             directory = config.userDirs.music;
diff --git a/modules/nixos/common/nix.nix b/modules/nixos/common/nix.nix
index c0061db..0caf265 100644
--- a/modules/nixos/common/nix.nix
+++ b/modules/nixos/common/nix.nix
@@ -14,6 +14,8 @@ in {
   };
 
   config = {
+    nix.settings.trusted-users = ["@wheel"];
+
     nixpkgs.config.allowUnfreePredicate = p: elem (getName p) cfg.allowedUnfreePackages;
 
     system.stateVersion = with builtins;
diff --git a/modules/nixos/firefox/default.nix b/modules/nixos/firefox/default.nix
index 2e24f23..e725e95 100644
--- a/modules/nixos/firefox/default.nix
+++ b/modules/nixos/firefox/default.nix
@@ -538,6 +538,7 @@ in {
             "browser.search.update" = false;
             "browser.tabs.closeWindowWithLastTab" = true;
             "browser.tabs.firefox-view" = false;
+            "browser.tabs.firefox-view-next" = false;
             "browser.tabs.inTitlebar" = 1;
             "browser.tabs.warnOnClose" = false;
             "browser.tabs.warnOnCloseOtherTabs" = false;
diff --git a/modules/nixos/git/default.nix b/modules/nixos/git/default.nix
index 9fb43db..4268f82 100644
--- a/modules/nixos/git/default.nix
+++ b/modules/nixos/git/default.nix
@@ -73,10 +73,10 @@ in {
             fastcgi_param QUERY_STRING $args;
             fastcgi_param HTTP_HOST $server_name;
 
-            # This makes `go get ...` work and adds analytics.
-            sub_filter '</head>'
-                '<meta name="go-import" content="$host$uri git https://$host$uri"><script defer data-domain="${cfg.server.domain}" src="https://plausible.shire.net/js/script.js"></script></head>';
-            sub_filter_once on;
+            ${nginxAppendHead [
+              ''<meta name="go-import" content="$host$uri git https://$host$uri">''
+              (htmlPlausibleScript {inherit (cfg.server) domain;})
+            ]}
           '';
           "~* ^.+(cgit.css|robots.txt)$".extraConfig = ''
             root ${cfg.server.package}/cgit;
@@ -88,16 +88,15 @@ in {
             alias ${./favicon.ico};
           '';
           "~* ^.+cgit-custom-style.css$".extraConfig = let
-            css = with config.colourScheme;
-              pkgs.writeText "custom.css" ''
-                @import url("cgit.css");
+            css = pkgs.writeText "custom.css" ''
+              @import url("cgit.css");
 
-                div#cgit {
-                  font-family: "${config.fontScheme.monospaceFont.family}", monospace;
-                  -moz-tab-size: 4;
-                  tab-size: 4;
-                }
-              '';
+              div#cgit {
+                font-family: "${config.fontScheme.monospaceFont.family}", monospace;
+                -moz-tab-size: 4;
+                tab-size: 4;
+              }
+            '';
           in ''
             alias ${css};
           '';
diff --git a/nixosConfigurations/manwe/webserver.nix b/nixosConfigurations/manwe/webserver.nix
index 6f8e088..5ea2418 100644
--- a/nixosConfigurations/manwe/webserver.nix
+++ b/nixosConfigurations/manwe/webserver.nix
@@ -1,7 +1,6 @@
 {
   inputs,
   lib,
-  pkgs,
   ...
 }:
 with lib; {
@@ -9,14 +8,70 @@ with lib; {
     enable = true;
     virtualHosts = with my.domain;
       {
-        # TODO Use a Self-signed certificate.
-        # TODO Allow overriding config.json, possibly via NGINX itself.
-        "start.local" = {
-          root = pkgs.hiccup;
-          locations."/".tryFiles = "$uri $uri/ /index.html";
-          enableACME = false;
-          forceSSL = false;
-        };
+        # TODO Start using this.
+        # "start.local" = {
+        #   root = pkgs.hiccup;
+        #   locations = {
+        #     "/".tryFiles = "$uri $uri/ /index.html";
+        #     "~* ^.+config.json$".extraConfig = let
+        #       config = pkgs.writeText "config.json" (generators.toJSON {} {
+        #         version = "2.0";
+        #         id = "default";
+        #         title = "Demo Config";
+        #         url = "./configs/config.json";
+        #         featured = [
+        #           {
+        #             name = "GitHub";
+        #             background = "/assets/card.png";
+        #             link = "https://github.com/ashwin-pc/hiccup";
+        #           }
+        #         ];
+        #         categories = [
+        #           {
+        #             title = "Category 1";
+        #             links = [
+        #               {
+        #                 name = "Link 1";
+        #                 link = "https://example.com";
+        #               }
+        #             ];
+        #           }
+        #           {
+        #             title = "Category 2";
+        #             links = [
+        #               {
+        #                 name = "Link 1";
+        #                 link = "https://example.com";
+        #               }
+        #             ];
+        #           }
+        #           {
+        #             title = "Category 3";
+        #             links = [
+        #               {
+        #                 name = "Link 1";
+        #                 link = "https://example.com";
+        #               }
+        #             ];
+        #           }
+        #           {
+        #             title = "Category 4";
+        #             links = [
+        #               {
+        #                 name = "Link 1";
+        #                 link = "https://example.com";
+        #               }
+        #             ];
+        #           }
+        #         ];
+        #       });
+        #     in ''
+        #       alias ${config};
+        #     '';
+        #   };
+        #   enableACME = false;
+        #   forceSSL = false;
+        # };
         ${shire}.locations."/".return = "301 https://www.youtube.com/watch?v=dQw4w9WgXcQ";
         "git.${shire}".locations."/".return = "301 https://git.${azahi}";
         "bitwarden.${shire}".locations."/".return = "301 https://vaultwarden.${shire}";
@@ -24,11 +79,7 @@ with lib; {
           serverAliases = ["frodo.${gondor}" "frodo.${rohan}"];
           locations."/" = {
             root = inputs.azahi-cc;
-            extraConfig = ''
-              sub_filter '</head>'
-                  '<script defer data-domain="${azahi}" src="https://plausible.shire.net/js/script.js"></script></head>';
-              sub_filter_once on;
-            '';
+            extraConfig = nginxAppendHead [(htmlPlausibleScript {domain = azahi;})];
           };
         };
       }

Consider giving Nix/NixOS a try! <3