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