diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-08-24 15:10:22 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-08-24 15:10:22 +0200 |
commit | 0c38364b28e3443ac45b56c08787bb70a2b30b28 (patch) | |
tree | 38140123e5283896dea43779ee37e9f3e509a25c /modules/by-name/dh/dhcpcd | |
parent | modules/hledger: Remove `hledger-edit` (diff) | |
download | nixos-config-0c38364b28e3443ac45b56c08787bb70a2b30b28.zip |
modules/: Hard-code user and group ids
This avoids relying on the state in /var/lib/nixos
Diffstat (limited to 'modules/by-name/dh/dhcpcd')
-rw-r--r-- | modules/by-name/dh/dhcpcd/module.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/modules/by-name/dh/dhcpcd/module.nix b/modules/by-name/dh/dhcpcd/module.nix new file mode 100644 index 00000000..5fee0100 --- /dev/null +++ b/modules/by-name/dh/dhcpcd/module.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + ... +}: let + cfg = config.soispha.dhcpcd; +in { + options.soispha.dhcpcd = { + enable = (lib.mkEnableOption "dhcpcd") // {default = config.networking.dhcpcd.enable;}; + }; + + config = lib.mkIf cfg.enable { + users = { + users.dhcpcd = { + uid = config.soispha.constants.ids.uids.dhcpcd; + group = "dhcpcd"; + }; + groups.dhcpcd.gid = config.soispha.constants.ids.gids.dhcpcd; + }; + }; +} |