hackens-org-configurations/machines/rigel/networking.nix

48 lines
933 B
Nix
Raw Normal View History

2024-03-08 17:04:42 +01:00
{
config,
lib,
pkgs,
...
2024-09-24 12:33:51 +02:00
}:
{
2024-03-08 17:04:42 +01:00
networking.useDHCP = false;
networking.firewall.allowedUDPPorts = [ 67 ];
systemd.network = {
enable = true;
networks = {
"10-uplink" = {
name = "end0";
networkConfig = {
Address = "10.1.1.1/24";
DHCPServer = "yes";
IPMasquerade = "ipv4";
};
dhcpServerConfig = {
2024-09-24 12:33:51 +02:00
PoolOffset = 100;
PoolSize = 20;
2024-03-08 17:04:42 +01:00
UplinkInterface = ":none";
2024-09-24 12:33:51 +02:00
EmitDNS = "no";
EmitNTP = "no";
EmitSIP = "no";
EmitRouter = "no";
2024-03-08 17:04:42 +01:00
};
dhcpServerStaticLeases = [
{
dhcpServerStaticLeaseConfig = {
Address = "10.1.1.2";
MACAddress = "14:b3:1f:06:3c:2e";
};
}
];
};
};
};
networking.nameservers = [
"2620:fe::fe"
"2620:fe::9"
"9.9.9.9"
"149.112.112.112"
];
}