Enable kea exporter on Genesis

This commit is contained in:
Greg Hellings
2025-11-23 01:11:56 -06:00
parent b450d1b170
commit cde08576c2
2 changed files with 21 additions and 12 deletions
+6 -3
View File
@@ -1,4 +1,4 @@
{ pkgs, ... }: { config, pkgs, ... }:
let let
lan = "ens18"; lan = "ens18";
lanIP = "10.42.1.5"; lanIP = "10.42.1.5";
@@ -76,7 +76,8 @@ in
environment.etc."hosts.d/local".text = extraHosts; environment.etc."hosts.d/local".text = extraHosts;
services = { services = {
kea.dhcp4 = ( kea = {
dhcp4 = (
import ./networking/dhcp.nix { import ./networking/dhcp.nix {
inherit inherit
iot iot
@@ -86,6 +87,7 @@ in
; ;
} }
); );
};
######### #########
# dnsmasq config # dnsmasq config
@@ -113,7 +115,8 @@ in
dnsmasq.enable = true; dnsmasq.enable = true;
kea = { kea = {
enable = true; enable = true;
targets = [ "http://127.0.0.1:8547" ]; openFirewall = true;
targets = [ (builtins.head config.services.kea.dhcp4.settings.control-sockets).socket-name ];
}; };
}; };
}; # End of services configuration }; # End of services configuration
+6
View File
@@ -7,6 +7,12 @@
{ {
enable = true; enable = true;
settings = { settings = {
control-sockets = [
{
socket-type = "unix";
socket-name = "/run/kea/dhcp4-control.sock";
}
];
valid-lifetime = 43200; # 12 hours, in seconds valid-lifetime = 43200; # 12 hours, in seconds
renew-timer = 1000; renew-timer = 1000;
rebind-timer = 2000; rebind-timer = 2000;