aboutsummaryrefslogtreecommitdiff
path: root/nix/wgautomesh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/wgautomesh.nix')
-rw-r--r--nix/wgautomesh.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nix/wgautomesh.nix b/nix/wgautomesh.nix
index c09b874..0e0b7b3 100644
--- a/nix/wgautomesh.nix
+++ b/nix/wgautomesh.nix
@@ -1,7 +1,7 @@
let
src = builtins.fetchGit {
url = "https://git.deuxfleurs.fr/lx/wgautomesh";
- rev = "43eced6e9aa5935b4553251604207f72bf0214c1";
+ rev = "65e979de801daa5f6ef77ed875e6505aa902fd9c";
};
wgautomesh = (import src).packages.x86_64-linux.default;
in
@@ -27,6 +27,10 @@ in
type = types.nullOr types.str;
description = "File containing the gossip secret encryption key";
};
+ persistFile = mkOption {
+ type = types.nullOr types.str;
+ description = "Path where to persist known peer addresses";
+ };
lanDiscovery = mkOption {
type = types.bool;
default = true;
@@ -78,6 +82,8 @@ in
extraDefs = (if cfg.lanDiscovery then ["lan_discovery = true"] else [])
++ (if (cfg.gossipSecretFile != null)
then [''gossip_secret_file = "${cfg.gossipSecretFile}"''] else [])
+ ++ (if (cfg.persistFile != null)
+ then [''persist_file = "${cfg.persistFile}"''] else [])
++ (if (cfg.upnpForwardPublicPort != null)
then [''upnp_forward_external_port = ${toString cfg.upnpForwardPublicPort}''] else []);
configfile = pkgs.writeText "wgautomesh.toml" ''