Add wireguard config

This commit is contained in:
ekzyis 2025-08-28 09:20:23 +02:00
parent 25e4a54ee2
commit 4a51eb5992

View File

@ -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.