mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
nixos/dovecot: create user/group only if they are default
This commit is contained in:
parent
d1a9c55d91
commit
9c7b067c6a
@ -178,20 +178,20 @@ in
|
||||
security.pam.services.dovecot2 = mkIf cfg.enablePAM {};
|
||||
|
||||
users.extraUsers = [
|
||||
{ name = cfg.user;
|
||||
uid = config.ids.uids.dovecot2;
|
||||
description = "Dovecot user";
|
||||
group = cfg.group;
|
||||
}
|
||||
{ name = "dovenull";
|
||||
uid = config.ids.uids.dovenull2;
|
||||
description = "Dovecot user for untrusted logins";
|
||||
group = cfg.group;
|
||||
}
|
||||
];
|
||||
] ++ optional (cfg.user == "dovecot2")
|
||||
{ name = "dovecot2";
|
||||
uid = config.ids.uids.dovecot2;
|
||||
description = "Dovecot user";
|
||||
group = cfg.group;
|
||||
};
|
||||
|
||||
users.extraGroups = singleton {
|
||||
name = cfg.group;
|
||||
users.extraGroups = optional (cfg.group == "dovecot2")
|
||||
{ name = "dovecot2";
|
||||
gid = config.ids.gids.dovecot2;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user