From 8ec087af30429f7d11e0bad9971193470a2f2f8f Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Sat, 9 Nov 2024 11:38:04 -0800 Subject: Rename file and update reference --- hosts/common/optional/services/dhcp.nix | 21 +++++++++++++++++++++ hosts/common/optional/services/kea.nix | 21 --------------------- hosts/darkstar/default.nix | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 hosts/common/optional/services/dhcp.nix delete mode 100644 hosts/common/optional/services/kea.nix diff --git a/hosts/common/optional/services/dhcp.nix b/hosts/common/optional/services/dhcp.nix new file mode 100644 index 0000000..6cfec9c --- /dev/null +++ b/hosts/common/optional/services/dhcp.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: +{ + + environment.systemPackages = with pkgs; [ + ipxe + ]; + + services.kea.dhcp4 = { + configFile = config.sops.secrets.kea-dhcp4_conf.path; + 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:${config.sops.secrets.kea-dhcp4_conf.path}" ]; + }; + }; +} diff --git a/hosts/common/optional/services/kea.nix b/hosts/common/optional/services/kea.nix deleted file mode 100644 index 6cfec9c..0000000 --- a/hosts/common/optional/services/kea.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, pkgs, ... }: -{ - - environment.systemPackages = with pkgs; [ - ipxe - ]; - - services.kea.dhcp4 = { - configFile = config.sops.secrets.kea-dhcp4_conf.path; - 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:${config.sops.secrets.kea-dhcp4_conf.path}" ]; - }; - }; -} diff --git a/hosts/darkstar/default.nix b/hosts/darkstar/default.nix index d7839c0..ac07076 100644 --- a/hosts/darkstar/default.nix +++ b/hosts/darkstar/default.nix @@ -32,7 +32,7 @@ ../common/core ../common/optional/services/asterisk.nix ../common/optional/services/chrony.nix - ../common/optional/services/kea.nix + ../common/optional/services/dhcp.nix ../common/optional/services/nsd.nix ../common/optional/services/openssh.nix ../common/optional/zfs.nix -- cgit v1.2.3