hosts/suwako: init

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2024-10-20 15:59:58 +05:30
parent eac8c77797
commit 5e54dfded8
10 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
{ lib, config, conf, pkgs, ... }:
{
networking = {
useDHCP = false;
hostName = "suwako";
firewall =
{
interfaces = {
enp0s6 = {
allowedTCPPorts = [ 22 443 80 ];
};
};
};
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;
}
];
};
};
}