From 185d4548bd3473662b7e6e44d3d9189ba64c10e8 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sun, 7 Apr 2024 02:45:20 +0300 Subject: [PATCH] host/shared/tor: improve some configs --- nixos/shared/tor-browser.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/nixos/shared/tor-browser.nix b/nixos/shared/tor-browser.nix index 074a736..08d4d3d 100644 --- a/nixos/shared/tor-browser.nix +++ b/nixos/shared/tor-browser.nix @@ -8,20 +8,19 @@ let pulseaudioSupport = true; }; - hostRunTorBrowser = pkgs.writeScriptBin "run-tor-browser" '' - set -x + hostRunTorBrowser = pkgs.writeScriptBin "tor-browser" '' ${pkgs.socat}/bin/socat -d TCP-LISTEN:6000,fork,bind=192.168.7.10 UNIX-CONNECT:/tmp/.X11-unix/X0 & ${pkgs.xorg.xhost}/bin/xhost + - ssh -X browser@192.168.7.11 run-tor-browser + ssh -X browser@192.168.7.11 tor-browser + ${pkgs.xorg.xhost}/bin/xhost - ''; - clientRunTorBrowser = pkgs.writeScriptBin "run-tor-browser" '' - set -x + clientRunTorBrowser = pkgs.writeScriptBin "tor-browser" '' PULSE_SERVER=tcp:192.168.7.10:4713 \ XAUTHORITY="/home/browser/.Xauthority" \ DBUS_SESSION_BUS_ADDRESS="" \ DISPLAY=192.168.7.10:0.0 \ - ${pkgs.apulse}/bin/apulse tor-browser $@ + ${pkgs.apulse}/bin/apulse ${torBrowser}/bin/tor-browser $@ ''; in { @@ -64,7 +63,7 @@ in home = "/home/browser"; openssh.authorizedKeys.keys = data.publicKeys.users.jan; extraGroups = [ "audio" "video" ]; - packages = [ clientRunTorBrowser torBrowser ]; + packages = [ clientRunTorBrowser ]; }; }; };