mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #2894 from kirelagin/fixusergroup
Fix conditional handling of users and groups in some services
This commit is contained in:
commit
02266194ea
2 changed files with 6 additions and 6 deletions
|
@ -68,7 +68,7 @@ in
|
|||
|
||||
users.extraUsers = optionalAttrs (cfg.user == "openldap") (singleton
|
||||
{ name = "openldap";
|
||||
group = "openldap";
|
||||
group = cfg.group;
|
||||
uid = config.ids.uids.openldap;
|
||||
});
|
||||
|
||||
|
|
|
@ -594,17 +594,17 @@ 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";
|
||||
group = mainCfg.group;
|
||||
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;
|
||||
};
|
||||
});
|
||||
|
||||
environment.systemPackages = [httpd] ++ concatMap (svc: svc.extraPath) allSubservices;
|
||||
|
||||
|
|
Loading…
Reference in a new issue