diff --git a/hosts/shared/wireguard.nix b/hosts/shared/wireguard.nix index 6142560..c341502 100644 --- a/hosts/shared/wireguard.nix +++ b/hosts/shared/wireguard.nix @@ -1,5 +1,6 @@ _: { nodeconfig.wireguard = { + interface-name = "Homelab"; endpoint = "165.232.180.97:51821"; endpoint-publickey = "NNw/iDMCTq8mpHncrecEh4UlvtINX/UUDtCJf2ToFR4="; allowed-ips = [ diff --git a/modules/wireguard.nix b/modules/wireguard.nix index 975f17a..d33a08d 100644 --- a/modules/wireguard.nix +++ b/modules/wireguard.nix @@ -52,16 +52,15 @@ let cfg = config.nodeconfig; in { config = lib.mkIf cfg.wireguard.enable { networking.firewall.trustedInterfaces = [ cfg.wireguard.interface-name ]; - networking.wireguard = { - enable = true; + networking.wg-quick = { interfaces = { "${cfg.wireguard.interface-name}" = { - ips = cfg.wireguard.node-ips; + address = cfg.wireguard.node-ips; + dns = [ "10.10.10.10" ]; listenPort = cfg.wireguard.listen-port; privateKeyFile = cfg.wireguard.pk-file; peers = [ { - name = "Default"; endpoint = cfg.wireguard.endpoint; publicKey = cfg.wireguard.endpoint-publickey; presharedKeyFile = cfg.wireguard.psk-file;