diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix index 0c6002c396b1..1c2cc65862e6 100644 --- a/nixos/modules/services/security/tor.nix +++ b/nixos/modules/services/security/tor.nix @@ -456,6 +456,8 @@ in package = lib.mkPackageOption pkgs "tor" { }; + obfs4Package = lib.mkPackageOption pkgs "obfs4" { }; + enableGeoIP = lib.mkEnableOption '' use of GeoIP databases. @@ -1253,7 +1255,7 @@ in BridgeRelay = true; ExtORPort.port = lib.mkDefault "auto"; ServerTransportPlugin.transports = lib.mkDefault [ "obfs4" ]; - ServerTransportPlugin.exec = lib.mkDefault "${lib.getExe pkgs.obfs4} managed"; + ServerTransportPlugin.exec = lib.mkDefault "${lib.getExe cfg.obfs4Package} managed"; } // lib.optionalAttrs (cfg.relay.role == "private-bridge") { ExtraInfoStatistics = false; @@ -1326,7 +1328,7 @@ in systemd.services.tor = { description = "Tor Daemon"; documentation = [ "man:tor(8)" ]; - path = [ pkgs.tor ]; + path = [ cfg.package ]; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ];