From 4a51eb5992d3aee34caddaafecd7c05401aa236a Mon Sep 17 00:00:00 2001 From: ekzyis Date: Thu, 28 Aug 2025 09:20:23 +0200 Subject: [PATCH] Add wireguard config --- configuration.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/configuration.nix b/configuration.nix index b3a842f..a45849f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -19,10 +19,30 @@ # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + networking.wireguard.enable = true; + networking.wg-quick.interfaces = { + wg0 = { + listenPort = 59141; + privateKeyFile = "/etc/wireguard/wg_privkey"; + address = [ "10.101.111.7/32" ]; + dns = [ "10.101.111.1" ]; + mtu = 1380; + peers = [ + { + publicKey = "0XGa5Bh9nycdOgelLxnM3j2NZU3pQwhZSadb8adCtRg="; + allowedIPs = [ "10.101.111.0/24" ]; + endpoint = "139.144.78.247:51871"; + persistentKeepalive = 30; + } + ]; + }; + }; networking.extraHosts = '' 10.101.111.1 bitwarden.ekzy.is ''; + virtualisation.docker.enable = true; # Set your time zone.