Add Wireguard to NixVM

This commit is contained in:
Thomas Avé 2024-06-13 13:58:30 +02:00
parent ccb5dd1dc8
commit 430d7e30c0
1 changed files with 13 additions and 0 deletions

View File

@ -3,4 +3,17 @@
imports = [ imports = [
(import ../Common/default.nix { inherit inputs config pkgs; }) (import ../Common/default.nix { inherit inputs config pkgs; })
]; ];
networking.wg-quick.interfaces = {
wg0 = {
address = [ "10.0.0.13/24" ];
privateKeyFile = "/home/user/.secrets/Wireguard/NixVM.key";
listenPort = 51820;
peers = [{
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
allowedIPs = [ "10.0.0.1/8" ];
endpoint = "192.168.1.1:13231";
}];
};
};
} }