mailsystem: Add vmail user and group configuration
This commit is contained in:
parent
9180d7345c
commit
56feea5754
2 changed files with 47 additions and 0 deletions
22
mailsystem/user.nix
Normal file
22
mailsystem/user.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.mailsystem;
|
||||
in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users."${cfg.vmailUserName}" = {
|
||||
uid = cfg.vmailUID;
|
||||
isSystemUser = true;
|
||||
group = cfg.vmailGroupName;
|
||||
home = cfg.mailDirectory;
|
||||
createHome = true;
|
||||
description = "Virtual Mail User";
|
||||
};
|
||||
|
||||
users.groups."${cfg.vmailGroupName}" = {
|
||||
gid = cfg.vmailUID;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue