Merge pull request #1730 from pSub/logcheck-uid
nixos: add uid for logcheck and only create a user for the default user
This commit is contained in:
commit
a49fbca134
@ -111,6 +111,7 @@
|
|||||||
memcached = 100;
|
memcached = 100;
|
||||||
cgminer = 101;
|
cgminer = 101;
|
||||||
munin = 102;
|
munin = 102;
|
||||||
|
logcheck = 103;
|
||||||
|
|
||||||
# When adding a uid, make sure it doesn't match an existing gid.
|
# When adding a uid, make sure it doesn't match an existing gid.
|
||||||
|
|
||||||
|
@ -208,12 +208,13 @@ in
|
|||||||
mapAttrsToList writeIgnoreRule cfg.ignore
|
mapAttrsToList writeIgnoreRule cfg.ignore
|
||||||
++ mapAttrsToList writeIgnoreCronRule cfg.ignoreCron;
|
++ mapAttrsToList writeIgnoreCronRule cfg.ignoreCron;
|
||||||
|
|
||||||
users.extraUsers = singleton
|
users.extraUsers = optionalAttrs (cfg.user == "logcheck") (singleton
|
||||||
{ name = cfg.user;
|
{ name = "logcheck";
|
||||||
|
uid = config.ids.uids.logcheck;
|
||||||
shell = "/bin/sh";
|
shell = "/bin/sh";
|
||||||
description = "Logcheck user account";
|
description = "Logcheck user account";
|
||||||
extraGroups = cfg.extraGroups;
|
extraGroups = cfg.extraGroups;
|
||||||
};
|
});
|
||||||
|
|
||||||
system.activationScripts.logcheck = ''
|
system.activationScripts.logcheck = ''
|
||||||
mkdir -m 700 -p /var/{lib,lock}/logcheck
|
mkdir -m 700 -p /var/{lib,lock}/logcheck
|
||||||
|
Loading…
x
Reference in New Issue
Block a user