Files
dotfiles/hosts/suwako/networking.nix
2025-06-29 20:49:40 +05:30

44 lines
833 B
Nix

{
conf,
...
}:
{
networking = {
useDHCP = false;
hostName = "suwako";
firewall = {
interfaces = {
enp0s6 = {
allowedTCPPorts = [
22
443
80
8080
25565
];
};
};
};
interfaces = {
enp0s6 = {
useDHCP = true;
};
};
wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
ips = [ suwako ];
listenPort = 17840;
privateKeyFile = "/var/secrets/wg.key";
peers = [
{
#Oracle VM1
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
allowedIPs = [ remilia ];
endpoint = "${conf.network.addresses.domain.natto}:17840";
persistentKeepalive = 25;
}
];
};
};
}