From d634694bdde8c249dc661ca79789a2b9aa6f860b Mon Sep 17 00:00:00 2001 From: Axel Karjalainen Date: Sun, 16 Mar 2025 20:02:42 +0200 Subject: [PATCH] nixos/cgit: use alias option for assets This makes it easier to replace an asset by just setting the Nginx virtual host's `locations."= robots.txt".alias`. Previously you had to either replace the extraConfig with mkForce or clear it and use the `alias` option. --- nixos/modules/services/networking/cgit.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/cgit.nix b/nixos/modules/services/networking/cgit.nix index 9c1f1bf7bf8e..c9abf022932f 100644 --- a/nixos/modules/services/networking/cgit.nix +++ b/nixos/modules/services/networking/cgit.nix @@ -256,9 +256,7 @@ in (genAttrs' [ "cgit.css" "cgit.png" "favicon.ico" "robots.txt" ] ( fileName: lib.nameValuePair "= ${stripLocation cfg}/${fileName}" { - extraConfig = '' - alias ${cfg.package}/cgit/${fileName}; - ''; + alias = lib.mkDefault "${cfg.package}/cgit/${fileName}"; } )) // {