From e54ebc5f0cf3720deafcba14e9c75a9aa003ed63 Mon Sep 17 00:00:00 2001 From: Shahab Dogar Date: Tue, 18 Mar 2025 11:50:01 +0500 Subject: [PATCH] fix: NixOS | name the peer and fix invalid syntax --- nixos/master/configuration.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/nixos/master/configuration.nix b/nixos/master/configuration.nix index e3fc5b2..ccd6620 100644 --- a/nixos/master/configuration.nix +++ b/nixos/master/configuration.nix @@ -155,18 +155,17 @@ wg0 = { ips = [ "192.168.20.1/24" ]; listenPort = 51820; - privateKey = "private-key"; + privateKeyFile = "/etc/wireguard/private-key"; + + peers = [ + { + name = "shahab"; + publicKey = "Y8Lj8zAKCyr65mS/jfjw5BA3btftJnx136joizPXBxE="; + allowedIPs = [ "192.168.20.2/32" ]; + } + ]; }; }; - - privateKeyFile = "/etc/wireguard/private-key"; - - peers = [ - { - publicKey = "shahab"; - allowedIPs = [ "192.168.20.2/32" ]; - } - ]; }; # Copy the NixOS configuration file and link it from the resulting system