diff options
| author | Leonardo <noreply@leoflo.me> | 2026-03-11 16:34:05 +0100 |
|---|---|---|
| committer | Leonardo <noreply@leoflo.me> | 2026-03-11 16:34:05 +0100 |
| commit | afc597e552facff6c0103657d315775902709841 (patch) | |
| tree | 75e411a8f5c57491b03f6057776df29ec3594487 /systems/odino/networking.nix | |
| parent | a7f0310e52a6d7dcfa0d11b7b3e683903ca41cd9 (diff) | |
| download | nixos-afc597e552facff6c0103657d315775902709841.tar.gz nixos-afc597e552facff6c0103657d315775902709841.zip | |
gerarchia modificata (sono pazzo)
Diffstat (limited to 'systems/odino/networking.nix')
| -rw-r--r-- | systems/odino/networking.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/systems/odino/networking.nix b/systems/odino/networking.nix new file mode 100644 index 0000000..3ab8e46 --- /dev/null +++ b/systems/odino/networking.nix @@ -0,0 +1,31 @@ +{lib, ...}: { + networking = { + hostName = "odino"; + useDHCP = lib.mkDefault true; + + nameservers = [ "208.67.222.222" "208.67.220.220" ]; + + firewall = { + enable = true; + + allowedTCPPorts = [ 22 ]; + allowedUDPPorts = [ 51820 ]; + }; + + networkmanager.enable = true; + + wg-quick.interfaces."tunnel" = { + privateKeyFile = "/home/leo/.wireguard/private.key"; + address = [ "10.69.0.2/24" ]; + + peers = [ + { + publicKey = "rwUMCdhjQbQt9uGjljfdABj4DSJFgL62bzT13sg8LmU="; + allowedIPs = [ "10.69.0.0/24" ]; + endpoint = "leoflo.me:51820"; + persistentKeepalive = 25; + } + ]; + }; + }; +} |
