aboutsummaryrefslogtreecommitdiff
path: root/nix/deuxfleurs.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/deuxfleurs.nix')
-rw-r--r--nix/deuxfleurs.nix25
1 files changed, 13 insertions, 12 deletions
diff --git a/nix/deuxfleurs.nix b/nix/deuxfleurs.nix
index 7632486..b174b97 100644
--- a/nix/deuxfleurs.nix
+++ b/nix/deuxfleurs.nix
@@ -207,18 +207,19 @@ in
};
services.wgautomesh = {
enable = true;
- interface = "wg0";
- gossipPort = 1666;
- gossipSecretFile = "/var/lib/wgautomesh/gossip_secret";
- persistFile = "/var/lib/wgautomesh/state";
- upnpForwardPublicPort =
- if clusterNodeCfg.endpoint != null then
- strings.toInt (lists.last (split ":" clusterNodeCfg.endpoint))
- else null;
- peers = attrValues (mapAttrs (hostname: { publicKey, endpoint, address, ... }: {
- inherit address endpoint;
- pubkey = publicKey;
- }) cfg.clusterNodes);
+ gossipSecretFile = "/var/lib/deuxfleurs/wgautomesh_gossip_secret";
+ settings = {
+ interface = "wg0";
+ gossip_port = 1666;
+ upnp_forward_external_port =
+ if clusterNodeCfg.endpoint != null then
+ strings.toInt (lists.last (split ":" clusterNodeCfg.endpoint))
+ else null;
+ peers = attrValues (mapAttrs (hostname: { publicKey, endpoint, address, ... }: {
+ inherit address endpoint;
+ pubkey = publicKey;
+ }) cfg.clusterNodes);
+ };
};
# Old code for wg-quick, we can use this as a fallback if we fail to make wgautomesh work
# systemd.services."wg-quick-wg0".after = [ "unbound.service" ];