diff --git a/modules/services/monitoring/nagios/default.nix b/modules/services/monitoring/nagios/default.nix index 6d2fe3f2ace..ddb0da21327 100644 --- a/modules/services/monitoring/nagios/default.nix +++ b/modules/services/monitoring/nagios/default.nix @@ -184,12 +184,7 @@ in ''; }; - services.httpd = mkIf cfg.enableWebInterface { - extraConfig = mkThenElse { - thenPart = extraHttpdConfig; - elsePart = ""; - }; - }; + services.httpd.extraConfig = optionalString cfg.enableWebInterface extraHttpdConfig; };