[roon-server] don't create user if user changes defaults

If the user changes the user for roon, we can assume they handled the setup for it
This commit is contained in:
Alex Guzman 2019-08-07 13:23:36 -07:00
parent 6572b5e4a1
commit 9f9b458ce3

View file

@ -48,6 +48,7 @@ in {
ExecStart = "${pkgs.roon-server}/opt/start.sh";
LimitNOFILE = 8192;
User = cfg.user;
Group = cfg.group;
};
};
@ -58,14 +59,14 @@ in {
allowedUDPPorts = [ 9003 ];
};
users.groups = singleton {
name = cfg.group;
};
users.users = singleton {
name = cfg.user;
isSystemUser = true;
description = "Roon Server user";
groups = [ cfg.group "audio" ];
};
users.groups."${cfg.group}" = {};
users.users."${cfg.user}" =
if cfg.user == "roon-server" then {
isSystemUser = true;
description = "Roon Server user";
groups = [ cfg.group "audio" ];
}
else {};
};
}