forward x11 and wayland
This commit is contained in:
parent
e48c086eb6
commit
249ea2632d
4 changed files with 38 additions and 0 deletions
|
@ -34,7 +34,15 @@
|
|||
bind.address = "/%d/.local/state/gnupg/S.gpg-agent";
|
||||
host.address = "/%d/.local/state/gnupg/S.gpg-agent.extra";
|
||||
}
|
||||
{
|
||||
bind.address = "/%d/.local/state/waypipe/server.sock";
|
||||
host.address = "/%d/.local/state/waypipe/client.sock";
|
||||
}
|
||||
];
|
||||
forwardX11 = true;
|
||||
forwardX11Trusted = true;
|
||||
setEnv.WAYLAND_DISPLAY = "wayland-waypipe";
|
||||
extraOptions.StreamLocalBindUnlink = "yes";
|
||||
};
|
||||
enable = true;
|
||||
};
|
||||
|
|
|
@ -3,5 +3,6 @@
|
|||
imports = [
|
||||
./kdeconnect.nix
|
||||
./gpg
|
||||
./waypipe.nix
|
||||
];
|
||||
}
|
||||
|
|
25
services/desktop/waypipe.nix
Normal file
25
services/desktop/waypipe.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.waypipe ];
|
||||
systemd.user.services = {
|
||||
waypipe-client = {
|
||||
Unit.Description = "Runs waypipe on startup to support SSH forwarding";
|
||||
Service = {
|
||||
ExecStartPre = "${lib.getExe' pkgs.coreutils "mkdir"} %h/.waypipe -p";
|
||||
ExecStart = "${lib.getExe pkgs.waypipe} --socket %h/.local/state/waypipe/client.sock client";
|
||||
ExecStopPost = "${lib.getExe' pkgs.coreutils "rm"} -f %h/.local/state/waypipe/client.sock";
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
waypipe-server = {
|
||||
Unit.Description = "Runs waypipe on startup to support SSH forwarding";
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStartPre = "${lib.getExe' pkgs.coreutils "mkdir"} %h/.waypipe -p";
|
||||
ExecStart = "${lib.getExe pkgs.waypipe} --socket %h/.local/state/waypipe/server.sock --title-prefix '[%H] ' --login-shell --display wayland-waypipe server -- ${lib.getExe' pkgs.coreutils "sleep"} infinity";
|
||||
ExecStopPost = "${lib.getExe' pkgs.coreutils "rm"} -f %h/.local/state/waypipe/server.sock %t/wayland-waypipe";
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -4,6 +4,10 @@
|
|||
services.openssh.settings = {
|
||||
PermitRootLogin = "yes";
|
||||
PasswordAuthentication = false;
|
||||
StreamLocalBindUnlink = "yes";
|
||||
GatewayPorts = "clientspecified";
|
||||
AcceptEnv = "WAYLAND_DISPLAY";
|
||||
X11Forwarding = true;
|
||||
};
|
||||
programs.ssh.knownHosts = {
|
||||
"git.chir.rs".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE+GanuiV1I08OP8+nNy24+zagQN08rtJnCoU/ixiQNn";
|
||||
|
|
Loading…
Reference in a new issue