From 57d389ead7f561e90f1a2c85f523b07605ca879f Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 8 Oct 2023 13:21:45 +0530 Subject: [PATCH] add wireguard config --- hosts/skipper/network.nix | 1 + hosts/skipper/wireguard.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 hosts/skipper/wireguard.nix diff --git a/hosts/skipper/network.nix b/hosts/skipper/network.nix index 788fba3..80f6208 100644 --- a/hosts/skipper/network.nix +++ b/hosts/skipper/network.nix @@ -1,4 +1,5 @@ {lib, ...}: { + imports = [./wireguard.nix]; networking = { hostName = "Skipper"; networkmanager = { diff --git a/hosts/skipper/wireguard.nix b/hosts/skipper/wireguard.nix new file mode 100644 index 0000000..8fc0cb9 --- /dev/null +++ b/hosts/skipper/wireguard.nix @@ -0,0 +1,15 @@ +_: { + networking.wireguard = { + enable = true; + interfaces = { + wg0 = { + ips = [ + "10.8.1.2/24" + "fdd9:69ae:9703::2/64" + ]; + privateKeyFile = "/etc/wireguard/private.key"; + generatePrivateKeyFile = true; + }; + }; + }; +}