From 356c2fe00dcadfb61f01d3962bb61f0210dfb957 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 28 Jul 2016 13:55:06 +0200 Subject: [PATCH] Revert "nginx: Verify that configuration is syntactically correct" (#17337) --- .../services/web-servers/nginx/default.nix | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index bd936c0ce993..27a33f33ff93 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.services.nginx; nginx = cfg.package; - configFileText = '' + configFile = pkgs.writeText "nginx.conf" '' user ${cfg.user} ${cfg.group}; daemon off; @@ -19,17 +19,6 @@ let ''} ${cfg.appendConfig} ''; - configFile = pkgs.runCommand "nginx.conf" { - text = configFileText; - passAsFile = ["text"]; - preferLocalBuild = true; - allowSubstitutes = false; - } '' - mkdir -p "$(dirname "$out")" - mv "$textPath" "$out" - (${nginx}/bin/nginx -t -c "$out" -p ${cfg.stateDir} || true) 2>&1 | grep -q 'syntax is ok' - ''; - in { @@ -102,6 +91,8 @@ in }; config = mkIf cfg.enable { + # TODO: test user supplied config file pases syntax test + systemd.services.nginx = { description = "Nginx Web Server"; after = [ "network.target" ];