modules/browsers: use ssh x11 forwarding to fix links

but I cannot switch locale now :(
This commit is contained in:
Dmitriy Pleshevskiy 2024-09-04 00:11:57 +03:00
parent 7b129546bb
commit 292fc5930f
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -18,7 +18,7 @@ let
if [ -z "$(ssh-keygen -F $host)" ]; then if [ -z "$(ssh-keygen -F $host)" ]; then
ssh-keyscan -H $host >> ~/.ssh/known_hosts ssh-keyscan -H $host >> ~/.ssh/known_hosts
fi fi
ssh -o PubkeyAuthentication=no kira@$host $@ ssh -X -o PubkeyAuthentication=no kira@$host $@
''; '';
hostBrowserScript = pkgs.writeScriptBin "${p.meta.mainProgram}" '' hostBrowserScript = pkgs.writeScriptBin "${p.meta.mainProgram}" ''
@ -82,20 +82,21 @@ in
bindMounts = lib.mkMerge [ bindMounts = lib.mkMerge [
{ {
"/tmp/.X11-unix" = { };
"/etc/ssh/keys" = { "/etc/ssh/keys" = {
isReadOnly = false; isReadOnly = false;
hostPath = "/etc/ssh/per-machine/browsers"; hostPath = "/persistence/per-machine/browsers/etc/ssh/keys";
}; };
"/home/kira/Downloads" = { "/home/kira/Downloads" = {
isReadOnly = false; isReadOnly = false;
hostPath = "/home/jan/downloads/browser"; hostPath = "/home/jan/downloads/browser";
}; };
"/run/opengl-driver/lib" = { };
"/run/opengl-driver-32/lib" = { };
} }
(lib.mkIf cfg.librewolf.enable { (lib.mkIf cfg.librewolf.enable {
"/home/kira/.librewolf" = { "/home/kira/.librewolf" = {
isReadOnly = false; isReadOnly = false;
hostPath = "/home/jan/.librewolf"; hostPath = "/persistence/per-machine/browsers/home/kira/.librewolf";
}; };
}) })
]; ];
@ -116,6 +117,7 @@ in
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
X11Forwarding = true;
PasswordAuthentication = true; PasswordAuthentication = true;
MaxAuthTries = 1; MaxAuthTries = 1;
}; };
@ -141,10 +143,7 @@ in
}; };
environment.sessionVariables = { environment.sessionVariables = {
DISPLAY = ":0";
PULSE_SERVER = "tcp:${hostAddress}:4713"; PULSE_SERVER = "tcp:${hostAddress}:4713";
XAUTHORITY = "/home/kira/.Xauthority";
DBUS_SESSION_BUS_ADDRESS = "";
}; };
}; };
}; };