From bfd970a07c231b5781871c16cb4612eb4c6b8fd4 Mon Sep 17 00:00:00 2001 From: aethrvmn Date: Sun, 31 Aug 2025 16:21:34 +0200 Subject: imported system/home-manager config --- hosts/pad/network.nix | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 hosts/pad/network.nix (limited to 'hosts/pad/network.nix') diff --git a/hosts/pad/network.nix b/hosts/pad/network.nix new file mode 100644 index 0000000..6831f92 --- /dev/null +++ b/hosts/pad/network.nix @@ -0,0 +1,53 @@ +{ config, pkgs, ... }: + +{ + networking = { + hostName = "pad"; # Define your hostname. + + # Enables wireless support via wpa_supplicant. + # wireless.enable = true; + + # Configure network proxy if necessary + # proxy.default = "http://user:password@proxy:port/"; + # proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networkmanager.enable = true; + + wireguard = { + enable = true; + + interfaces = { + rousi = { + ips = [ + "10.0.0.4/24" + ]; + listenPort = 51820; + privateKeyFile = "/home/aethrvmn/.creds/rousikey"; + + peers = [ + { + allowedIPs = [ + "192.168.10.0/24" + "172.16.0.0/24" + ]; + publicKey = "LEeO3Qy6c3W0qoR1xFhl7Fx29Oppq8tKE72HPoA831I="; + endpoint = "vpn.valatsos.gr:51820"; + persistentKeepalive = 25; + } + ]; + }; + }; + }; + + # Open ports in the firewall. + firewall = { + ## 1313 is for HUGO + allowedTCPPorts = [ 1313 ]; + ## 51820 is wg 53317 is localsend + allowedUDPPorts = [ 51820 53317 ]; + }; + # Or disable the firewall altogether. + # firewall.enable = false; + }; +} -- cgit v1.2.3