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

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