diff options
Diffstat (limited to 'modules/by-name/co/constants')
-rw-r--r-- | modules/by-name/co/constants/module.nix | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/modules/by-name/co/constants/module.nix b/modules/by-name/co/constants/module.nix new file mode 100644 index 00000000..5711e9cf --- /dev/null +++ b/modules/by-name/co/constants/module.nix @@ -0,0 +1,57 @@ +# This file is inspired by the `nixos/modules/misc/ids.nix` +# file in nixpkgs. +{lib, ...}: { + options.soispha.constants = { + ids.uids = lib.mkOption { + internal = true; + description = '' + The user IDs used in this nixos config. + ''; + type = lib.types.attrsOf (lib.types.ints.between 0 1000); + }; + ids.gids = lib.mkOption { + internal = true; + description = '' + The group IDs used in this nixos config. + ''; + type = lib.types.attrsOf (lib.types.ints.between 0 1000); + }; + }; + + config.soispha.constants = { + ids.uids = { + # Keep this sorted with `!sort --numeric-sort --key=2 --field-separator="="` + + dhcpcd = 992; + systemd-oom = 993; + sshd = 994; + rtkit = 995; + nscd = 996; + nm-iodine = 997; + fwupd-refresh = 998; + avahi = 999; + + # As per the NixOS file, the uids should not be greater or equal to 400; + }; + ids.gids = { + # Please add your groups to the users and inherit them here. + # This avoids having an user/group id mismatch. + + dhcpcd = 987; + lpadmin = 988; + resolvconf = 989; + systemd-oom = 990; + systemd-coredump = 991; + sshd = 992; + rtkit = 993; + polkituser = 994; + nscd = 995; + msr = 996; + fwupd-refresh = 997; + avahi = 998; + adbusers = 999; + + # The gid should match the uid. Thus should not be >= 400; + }; + }; +} |