hosts/hina: init

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-08-16 13:44:42 +05:30
parent e281e912d8
commit d4554d43ae
11 changed files with 167 additions and 8 deletions

35
hosts/hina/networking.nix Normal file
View File

@@ -0,0 +1,35 @@
{ lib, config, lib', pkgs, ... }:
{
networking = {
useDHCP = false;
hostName = "hina";
firewall =
{
interfaces = {
ens3 = {
allowedTCPPorts = [ 9898 80 443 ];
};
};
};
interfaces = {
ens3 = {
useDHCP = true;
};
};
wireguard.interfaces.wg0 = with lib'.network.addresses.wireguard.ips; {
ips = [ hina ];
listenPort = 17840;
privateKeyFile = "/var/secrets/wg.key";
peers = [
{
#Oracle VM1
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
allowedIPs = [ remilia ];
endpoint = "${lib'.network.addresses.domain.natto}:17840";
persistentKeepalive = 25;
}
];
};
};
}