diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index b8359d4756b3..75ec6671d156 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -594,14 +594,14 @@ in message = "SSL is enabled for HTTPD, but sslServerCert and/or sslServerKey haven't been specified."; } ]; - users.extraUsers = optional (mainCfg.user == "wwwrun") + users.extraUsers = optionalAttrs (mainCfg.user == "wwwrun") singleton { name = "wwwrun"; group = "wwwrun"; description = "Apache httpd user"; uid = config.ids.uids.wwwrun; }; - users.extraGroups = optional (mainCfg.group == "wwwrun") + users.extraGroups = optionalAttrs (mainCfg.group == "wwwrun") singleton { name = "wwwrun"; gid = config.ids.gids.wwwrun; };