about summary refs log tree commit diff stats
path: root/modules/by-name/dh/dhcpcd/module.nix
blob: 5fee010084f48cb24dd63a6f70ed86d9d092700c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
    };
  };
}