Better Server cfg

This commit is contained in:
soraefir
2026-05-03 02:20:41 +02:00
parent d3a3941591
commit 9377d1ce45
8 changed files with 99 additions and 70 deletions

View File

@@ -7,7 +7,6 @@
activePeers = builtins.filter isValidPeer config.syscfg.peers;
in
{
imports = [ ./forwarding.nix ];
config = lib.mkIf (config.syscfg.net.wg.enable) {
networking.wireguard = {
enable = true;
@@ -19,7 +18,7 @@ in
listenPort = 1515;
mtu = 1340;
peers =
if config.syscfg.net.wg.server.enable then
if config.syscfg.server ? wireguard then
map (p: {
name = p.syscfg.hostname;
publicKey = p.syscfg.net.wg.pubkey;