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.
This commit is contained in:
Axel Karjalainen
2025-03-16 20:02:42 +02:00
parent 6a7d91d53a
commit d634694bdd

View File

@@ -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}";
}
))
// {