diff --git a/modules/services/web-servers/apache-httpd/default.nix b/modules/services/web-servers/apache-httpd/default.nix index a101b077e47e..90c0adee2a7b 100644 --- a/modules/services/web-servers/apache-httpd/default.nix +++ b/modules/services/web-servers/apache-httpd/default.nix @@ -557,14 +557,14 @@ in config = mkIf config.services.httpd.enable { - users.extraUsers = singleton - { name = mainCfg.user; - group = mainCfg.group; + users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton + { name = "wwwrun"; + group = "wwwrun"; description = "Apache httpd user"; }; - users.extraGroups = singleton - { name = mainCfg.group; + users.extraGroups = optionalAttrs (mainCfg.group == "wwwrun") singleton + { name = "wwwrun"; }; environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices;