33 lines
712 B
Nix
33 lines
712 B
Nix
{ config, pkgs, lib, hostRegistry, ... }:
|
|
|
|
{
|
|
imports = [ ../../../lib/lxc-container.nix ../../../lib/shared.nix ];
|
|
|
|
c3d2 = {
|
|
isInHq = true;
|
|
hq.interface = "eth0";
|
|
};
|
|
|
|
networking.hostName = "dhcp";
|
|
networking.defaultGateway = "172.22.99.1";
|
|
networking.interfaces.eth0 = {
|
|
ipv4.addresses = [{
|
|
address = hostRegistry.hosts.dhcp.ip4;
|
|
prefixLength = 24;
|
|
}];
|
|
useDHCP = lib.mkForce false;
|
|
};
|
|
|
|
# dhcp
|
|
networking.firewall.allowedUDPPorts = [ 67 68 ];
|
|
|
|
services.dhcpd4 = {
|
|
enable = true;
|
|
interfaces = [ config.c3d2.hq.interface ];
|
|
authoritative = true;
|
|
# the leases are defined in the secrets module imported
|
|
# at the top-level of this flake
|
|
};
|
|
|
|
}
|