diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index 1e5a8b9bc357..d6b9836498d1 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -16,6 +16,8 @@ let error_log stderr; daemon off; + ${cfg.config} + http { include ${cfg.package}/conf/mime.types; include ${cfg.package}/conf/fastcgi.conf; @@ -86,18 +88,10 @@ let } } ''} - } - ${cfg.config} - - # Keep this seperate to allow overriding previous settings - ${optionalString (cfg.httpConfig != "") '' - http { - include ${cfg.package}/conf/mime.types; - include ${cfg.package}/conf/fastcgi.conf; ${cfg.httpConfig} } - ''} + ${cfg.appendConfig} '';