aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/common/optional/services/kea.nix
blob: 2ce098a874cc605331c89588b259049c08d42adf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  services.kea.dhcp4 = {
    configFile = "/run/secrets/kea-dhcp4.conf";
    enable = true;
  };

  systemd.services.kea-dhcp4-server = {
    serviceConfig = {
      ExecStart = ''
        ${pkgs.kea}/bin/kea-dhcp4 -c ''${CREDENTIALS_DIRECTORY}/kea-dhcp4.conf
      '';
      LoadCredential = "kea-dhcp4.conf:/run/secrets/kea-dhcp4.conf";
    };
  };
}