Enable kea exporter on Genesis
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
lan = "ens18";
|
lan = "ens18";
|
||||||
lanIP = "10.42.1.5";
|
lanIP = "10.42.1.5";
|
||||||
@@ -76,16 +76,18 @@ in
|
|||||||
environment.etc."hosts.d/local".text = extraHosts;
|
environment.etc."hosts.d/local".text = extraHosts;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
kea.dhcp4 = (
|
kea = {
|
||||||
import ./networking/dhcp.nix {
|
dhcp4 = (
|
||||||
inherit
|
import ./networking/dhcp.nix {
|
||||||
iot
|
inherit
|
||||||
lan
|
iot
|
||||||
lanIP
|
lan
|
||||||
routerIP
|
lanIP
|
||||||
;
|
routerIP
|
||||||
}
|
;
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
#########
|
#########
|
||||||
# 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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user