about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorlassulus <github@lassul.us>2024-03-23 21:39:05 +0700
committerGitHub <noreply@github.com>2024-03-23 21:39:05 +0700
commit91a24793e3306972f1fea146c671b123df764308 (patch)
treee1197d240c650cf704d2ca73e1b27750d1c8fe93 /nixos
parentd462bfebeb7a538b2cdf926d013238fe123cd77b (diff)
parent21721e41961719c2db003dfaf4d037a91c3d510f (diff)
downloadnixlib-91a24793e3306972f1fea146c671b123df764308.tar
nixlib-91a24793e3306972f1fea146c671b123df764308.tar.gz
nixlib-91a24793e3306972f1fea146c671b123df764308.tar.bz2
nixlib-91a24793e3306972f1fea146c671b123df764308.tar.lz
nixlib-91a24793e3306972f1fea146c671b123df764308.tar.xz
nixlib-91a24793e3306972f1fea146c671b123df764308.tar.zst
nixlib-91a24793e3306972f1fea146c671b123df764308.zip
Merge pull request #298336 from flokli/mycelium-description-fixes
nixos/mycelium: description updates
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/mycelium.nix23
1 files changed, 15 insertions, 8 deletions
diff --git a/nixos/modules/services/networking/mycelium.nix b/nixos/modules/services/networking/mycelium.nix
index 71ff8d1dd9af..9c4bca7c6861 100644
--- a/nixos/modules/services/networking/mycelium.nix
+++ b/nixos/modules/services/networking/mycelium.nix
@@ -9,17 +9,23 @@ in
     peers = lib.mkOption {
       type = lib.types.listOf lib.types.str;
       description = ''
-        List of peers to connect to in the format quic://1.2.3.4:9651.
-        If addHostedPublicNodes is set to true, the hosted public nodes will be added to this list.
+        List of peers to connect to, in the formats:
+         - `quic://[2001:0db8::1]:9651`
+         - `quic://192.0.2.1:9651`
+         - `tcp://[2001:0db8::1]:9651`
+         - `tcp://192.0.2.1:9651`
+
+        If addHostedPublicNodes is set to true, the hosted public nodes will also be added.
       '';
-      default = [];
+      default = [ ];
     };
     keyFile = lib.mkOption {
       type = lib.types.nullOr lib.types.path;
       default = null;
       description = ''
-        optional path to a keyFile, if unset the default location (/var/lib/mycelium/key) will be used
-        If this key does not exist, it will be generated
+        Optional path to a file containing the mycelium key material.
+        If unset, the default location (`/var/lib/mycelium/key.bin`) will be used.
+        If no key exist at this location, it will be generated on startup.
       '';
     };
     openFirewall = lib.mkOption {
@@ -37,7 +43,7 @@ in
       type = lib.types.bool;
       default = true;
       description = ''
-        add the hosted peers from https://github.com/threefoldtech/mycelium#hosted-public-nodes
+        Adds the hosted peers from https://github.com/threefoldtech/mycelium#hosted-public-nodes.
       '';
     };
   };
@@ -79,9 +85,10 @@ in
             "--key-file \${CREDENTIALS_DIRECTORY}/keyfile" else
             "--key-file %S/mycelium/key.bin"
           )
-          "--tun-name" "mycelium"
+          "--tun-name"
+          "mycelium"
         ] ++
-          (lib.optional (cfg.addHostedPublicNodes || cfg.peers != []) "--peers")
+        (lib.optional (cfg.addHostedPublicNodes || cfg.peers != [ ]) "--peers")
         ++ cfg.peers ++ (lib.optionals cfg.addHostedPublicNodes [
           "tcp://188.40.132.242:9651" # DE 01
           "tcp://[2a01:4f8:221:1e0b::2]:9651"