nixos-config/services/desktop/waypipe.nix

26 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2024-11-21 08:49:24 +00:00
{ pkgs, lib, ... }:
{
home.packages = [ pkgs.waypipe ];
systemd.user.services = {
waypipe-client = {
Unit.Description = "Runs waypipe on startup to support SSH forwarding";
Service = {
2024-11-22 19:46:22 +00:00
ExecStartPre = "${lib.getExe' pkgs.coreutils "mkdir"} %h/.local/state/waypipe -p";
2024-11-21 08:49:24 +00:00
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";
2024-11-22 19:46:22 +00:00
ExecStartPre = "${lib.getExe' pkgs.coreutils "mkdir"} %h/.local/state/waypipe -p";
2024-11-21 08:49:24 +00:00
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" ];
};
};
}