Skip to content

Commit

Permalink
Revert "nginx: Format the config file"
Browse files Browse the repository at this point in the history
This reverts commit e362a3d.

See NixOS#22883
  • Loading branch information
globin committed Feb 16, 2017
1 parent 96c152f commit 6e12406
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions nixos/modules/services/web-servers/nginx/default.nix
Expand Up @@ -16,20 +16,7 @@ let
) cfg.virtualHosts;
enableIPv6 = config.networking.enableIPv6;

configFile = pkgs.runCommand "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" ''
configFile = pkgs.writeText "nginx.conf" ''
user ${cfg.user} ${cfg.group};
error_log stderr;
daemon off;
Expand Down

0 comments on commit 6e12406

Please sign in to comment.