treewide: run nginx -t on all nginx config files
This commit is contained in:
parent
03c9638098
commit
32db921204
|
@ -61,7 +61,9 @@
|
|||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ ] ++ config.overlays or [ ];
|
||||
overlays = [
|
||||
(import ./overlays/nginx-test.nix)
|
||||
] ++ config.overlays or [ ];
|
||||
};
|
||||
}
|
||||
(removeAttrs config [ "modules" "overlays" ])
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
final: prev: {
|
||||
writers = prev.writers // {
|
||||
writeNginxConfig = name: text: final.runCommandLocal name {
|
||||
nginxConfig = prev.writers.writeNginxConfig name text;
|
||||
nativeBuildInputs = [ final.nginx ];
|
||||
} ''
|
||||
ln -s "$nginxConfig" "$out"
|
||||
nginx -t -c "$out"
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue