host/shared/tor: improve some configs

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-07 02:45:20 +03:00
parent 296db5b5fb
commit 185d4548bd
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -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 ];
};
};
};