59 lines
1.4 KiB
Nix
59 lines
1.4 KiB
Nix
{ config, lib, pkgs, ... }: {
|
|
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
|
|
|
|
systemd.network = {
|
|
enable = true;
|
|
networks = {
|
|
"uplink" = {
|
|
name = "eno1";
|
|
DHCP = "ipv4";
|
|
# networkConfig.IPMasquerade = "ipv4";
|
|
};
|
|
"10-enp2s0" = {
|
|
name = "enp2s0";
|
|
bridge = [ "netboot-client" ];
|
|
networkConfig = {
|
|
LLDP = false;
|
|
EmitLLDP = false;
|
|
LinkLocalAddressing = false;
|
|
IPv6AcceptRA = false;
|
|
IPv6SendRA = false;
|
|
};
|
|
};
|
|
"10-enp3s2" = {
|
|
name = "enp3s2";
|
|
bridge = [ "netboot-client" ];
|
|
networkConfig = {
|
|
LLDP = false;
|
|
EmitLLDP = false;
|
|
LinkLocalAddressing = false;
|
|
IPv6AcceptRA = false;
|
|
IPv6SendRA = false;
|
|
};
|
|
};
|
|
"11-netboot-client" = {
|
|
name = "netboot-client";
|
|
address = [ "192.168.222.1/24" ];
|
|
# dhcpServerConfig = {
|
|
# PoolOffset = 100;
|
|
# PoolSize = 100;
|
|
# BootServerAddress = "192.168.222.1";
|
|
# };
|
|
};
|
|
};
|
|
netdevs."10-client".netdevConfig = {
|
|
Name = "netboot-client";
|
|
Kind = "bridge";
|
|
};
|
|
};
|
|
networking.nameservers =
|
|
[ "208.67.222.222" ];
|
|
|
|
networking.nat = {
|
|
enable = true;
|
|
internalInterfaces = [ "netboot-client" ];
|
|
externalInterface = "eno1";
|
|
};
|
|
|
|
services.netbird.enable = true;
|
|
}
|