diff options
Diffstat (limited to 'modules/misc')
| -rw-r--r-- | modules/misc/ids.nix | 13 | ||||
| -rw-r--r-- | modules/misc/lib.nix | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/modules/misc/ids.nix b/modules/misc/ids.nix index 0bccdbc..34b3685 100644 --- a/modules/misc/ids.nix +++ b/modules/misc/ids.nix @@ -8,7 +8,7 @@ # to change uids/gids on service start, in example a service with a lot of # files. -{ lib, ... }: +{ lib, config, ... }: let inherit (lib) types; @@ -18,7 +18,7 @@ in ids.uids = lib.mkOption { internal = true; - description = lib.mdDoc '' + description = '' The user IDs used in NixOS. ''; type = types.attrsOf types.int; @@ -26,7 +26,7 @@ in ids.gids = lib.mkOption { internal = true; - description = lib.mdDoc '' + description = '' The group IDs used in NixOS. ''; type = types.attrsOf types.int; @@ -34,15 +34,16 @@ in }; - config = { ids.uids = { - nixbld = 300; + nixbld = lib.mkDefault 350; + _prometheus-node-exporter = 534; }; ids.gids = { - nixbld = 30000; + nixbld = lib.mkDefault (if config.system.stateVersion < 5 then 30000 else 350); + _prometheus-node-exporter = 534; }; }; diff --git a/modules/misc/lib.nix b/modules/misc/lib.nix index 3599661..e50794c 100644 --- a/modules/misc/lib.nix +++ b/modules/misc/lib.nix @@ -7,7 +7,7 @@ type = lib.types.attrsOf lib.types.attrs; - description = lib.mdDoc '' + description = '' This option allows modules to define helper functions, constants, etc. ''; }; |
