nixos-config/services/desktop/waypipe.nix
Charlotte 🦝 Delenk ff590bcd14
All checks were successful
Hydra nixosConfigurations.oracle-installer Hydra build #27282 of nixos-config:pr618:nixosConfigurations.oracle-installer
Hydra nixosConfigurations.pc-installer Hydra build #27283 of nixos-config:pr618:nixosConfigurations.pc-installer
Hydra nixosConfigurations.thinkrac Hydra build #27285 of nixos-config:pr618:nixosConfigurations.thinkrac
Hydra nixosConfigurations.rainbow-resort Hydra build #27284 of nixos-config:pr618:nixosConfigurations.rainbow-resort
fix waypipe service
2024-11-22 20:46:22 +01:00

25 lines
1.2 KiB
Nix

{ 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/.local/state/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/.local/state/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" ];
};
};
}