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.

Changed files
+1 -3
nixos
modules
services
networking
+1 -3
nixos/modules/services/networking/cgit.nix
···
(genAttrs' [ "cgit.css" "cgit.png" "favicon.ico" "robots.txt" ] (
fileName:
lib.nameValuePair "= ${stripLocation cfg}/${fileName}" {
-
extraConfig = ''
-
alias ${cfg.package}/cgit/${fileName};
-
'';
}
))
// {
···
(genAttrs' [ "cgit.css" "cgit.png" "favicon.ico" "robots.txt" ] (
fileName:
lib.nameValuePair "= ${stripLocation cfg}/${fileName}" {
+
alias = lib.mkDefault "${cfg.package}/cgit/${fileName}";
}
))
// {