fix: NixOS | name the peer and fix invalid syntax

This commit is contained in:
2025-03-18 11:50:01 +05:00
parent 3f7b5e23c1
commit e54ebc5f0c

View File

@@ -155,19 +155,18 @@
wg0 = { wg0 = {
ips = [ "192.168.20.1/24" ]; ips = [ "192.168.20.1/24" ];
listenPort = 51820; listenPort = 51820;
privateKey = "private-key";
};
};
privateKeyFile = "/etc/wireguard/private-key"; privateKeyFile = "/etc/wireguard/private-key";
peers = [ peers = [
{ {
publicKey = "shahab"; name = "shahab";
publicKey = "Y8Lj8zAKCyr65mS/jfjw5BA3btftJnx136joizPXBxE=";
allowedIPs = [ "192.168.20.2/32" ]; allowedIPs = [ "192.168.20.2/32" ];
} }
]; ];
}; };
};
};
# Copy the NixOS configuration file and link it from the resulting system # Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you # (/run/current-system/configuration.nix). This is useful in case you