diff --git a/hosts/lillypc/.gitignore b/hosts/lillypc/.gitignore index f44c2f7..caa502d 100644 --- a/hosts/lillypc/.gitignore +++ b/hosts/lillypc/.gitignore @@ -1,2 +1 @@ -wireguard.nix secrets.nix \ No newline at end of file diff --git a/hosts/lillypc/wireguard.nix b/hosts/lillypc/wireguard.nix new file mode 100644 index 0000000..7df6941 --- /dev/null +++ b/hosts/lillypc/wireguard.nix @@ -0,0 +1,27 @@ +let + vars = import ./secrets.nix; +in +{ + networking.wireguard = { + enable = true; + interfaces = { + wgbackup = { + ips = [ + "10.246.2.3/24" + ]; + peers = [ + { + allowedIPs = [ + "10.246.2.2/32" + ]; + endpoint = "unraid.mousesama.net:51820"; + publicKey = vars.peerPublicKey; + presharedKey = vars.presharedKey; + persistentKeepalive = 25; + } + ]; + privateKey = vars.privateKey; + }; + }; + }; +}