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:
@@ -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}";
|
||||
}
|
||||
))
|
||||
// {
|
||||
|
||||
Reference in New Issue
Block a user