about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2018-11-24 12:41:37 +0000
committerGitHub <noreply@github.com>2018-11-24 12:41:37 +0000
commite426613174f28c5a048f63c2e294d13736500ecc (patch)
treeb11b2afe3c0b82a9493851db51fa115ddae1cabb /nixos
parent651baa7deda03680d9f1682b12d53c80e7ec27a6 (diff)
parent5640aa28141026cbaf3f5c8211fedd0ac83580d0 (diff)
downloadnixlib-e426613174f28c5a048f63c2e294d13736500ecc.tar
nixlib-e426613174f28c5a048f63c2e294d13736500ecc.tar.gz
nixlib-e426613174f28c5a048f63c2e294d13736500ecc.tar.bz2
nixlib-e426613174f28c5a048f63c2e294d13736500ecc.tar.lz
nixlib-e426613174f28c5a048f63c2e294d13736500ecc.tar.xz
nixlib-e426613174f28c5a048f63c2e294d13736500ecc.tar.zst
nixlib-e426613174f28c5a048f63c2e294d13736500ecc.zip
Merge pull request #50950 from jonasnick/nixos-tor-hiddenservice-version
nixos/tor: add HiddenServiceVersion option
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/security/tor.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix
index aca2cf8cdeaa..61b751bb518b 100644
--- a/nixos/modules/services/security/tor.nix
+++ b/nixos/modules/services/security/tor.nix
@@ -92,6 +92,7 @@ let
   # Hidden services
   + concatStrings (flip mapAttrsToList cfg.hiddenServices (n: v: ''
     HiddenServiceDir ${torDirectory}/onion/${v.name}
+    ${optionalString (v.version != null) "HiddenServiceVersion ${toString v.version}"}
     ${flip concatMapStrings v.map (p: ''
       HiddenServicePort ${toString p.port} ${p.destination}
     '')}
@@ -667,6 +668,12 @@ in
                  };
                }));
              };
+
+             version = mkOption {
+               default = null;
+               description = "Rendezvous service descriptor version to publish for the hidden service. Currently, versions 2 and 3 are supported. (Default: 2)";
+               type = types.nullOr (types.enum [ 2 3 ]);
+             };
           };
 
           config = {