summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--modules/by-name/dh/dhcpcd/module.nix18
1 files changed, 18 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 0000000..0e35af3
--- /dev/null
+++ b/modules/by-name/dh/dhcpcd/module.nix
@@ -0,0 +1,18 @@
+{
+  config,
+  lib,
+  ...
+}: let
+  cfg = config.vhack.dhcpcd;
+in {
+  options.vhack.dhcpcd = {
+    enable = (lib.mkEnableOption "dhcpcd") // {default = config.networking.dhcpcd.enable;};
+  };
+
+  config = lib.mkIf cfg.enable {
+    users = {
+      users.dhcpcd.uid = config.vhack.constants.ids.uids.dhcpcd;
+      groups.dhcpcd.gid = config.vhack.constants.ids.gids.dhcpcd;
+    };
+  };
+}