mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
Revert "nginx: Format the config file"
This reverts commit e362a3d5c9
.
See #22883
This commit is contained in:
parent
96c152f98e
commit
6e12406e30
1 changed files with 1 additions and 14 deletions
|
@ -16,20 +16,7 @@ let
|
||||||
) cfg.virtualHosts;
|
) cfg.virtualHosts;
|
||||||
enableIPv6 = config.networking.enableIPv6;
|
enableIPv6 = config.networking.enableIPv6;
|
||||||
|
|
||||||
configFile = pkgs.runCommand "nginx.conf" {
|
configFile = pkgs.writeText "nginx.conf" ''
|
||||||
inherit configFileUnformatted;
|
|
||||||
passAsFile = [ "configFileUnformatted" ];
|
|
||||||
# configFileUnformatted is created locally, therefore so should this be.
|
|
||||||
preferLocalBuild = true;
|
|
||||||
allowSubstitutes = false;
|
|
||||||
} ''
|
|
||||||
cp ${configFileUnformatted} nginx.conf
|
|
||||||
chmod u+w nginx.conf
|
|
||||||
${pkgs.nginx-config-formatter}/bin/nginxfmt nginx.conf
|
|
||||||
cp nginx.conf $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
configFileUnformatted = pkgs.writeText "nginx.unformatted.conf" ''
|
|
||||||
user ${cfg.user} ${cfg.group};
|
user ${cfg.user} ${cfg.group};
|
||||||
error_log stderr;
|
error_log stderr;
|
||||||
daemon off;
|
daemon off;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue