sway: Add systemd module for wayvnc
Some checks failed
/ check (push) Failing after 2m52s

This commit is contained in:
Erwin Boskma 2024-01-30 08:39:30 +01:00
parent 071736afcf
commit 883c28d416
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
2 changed files with 28 additions and 6 deletions

View file

@ -12,7 +12,9 @@ with lib; let
in in
{ {
options.eboskma.programs.sway = { options.eboskma.programs.sway = {
enable = mkEnableOption "Enable sway"; enable = mkEnableOption "sway";
wayvnc = mkEnableOption "wayvnc";
lock-wallpaper = mkOption { lock-wallpaper = mkOption {
description = "Wallpaper to use for the lockscreen"; description = "Wallpaper to use for the lockscreen";
type = types.path; type = types.path;
@ -333,10 +335,29 @@ in
}; };
}; };
systemd.user.targets.tray = { systemd.user = {
Unit = { services = {
Description = "Home Manager System Tray"; wayvnc = mkIf cfg.wayvnc {
Requires = [ "graphical-session-pre.target" ]; Unit = {
Description = "VNC server for wlroots based Wayland compositors";
After = [ "sway-session.target" ];
};
Service = {
ExecStart = "${pkgs.wayvnc}/bin/wayvnc 0.0.0.0";
Restart = "on-failure";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session-pre.target" ];
};
}; };
}; };
}; };

View file

@ -146,6 +146,7 @@ in
starship.enable = true; starship.enable = true;
sway = { sway = {
enable = true; enable = true;
wayvnc = true;
lock-wallpaper = ../../wallpapers/river-3840.png; lock-wallpaper = ../../wallpapers/river-3840.png;
output = { output = {
"DP-1" = { "DP-1" = {
@ -173,7 +174,7 @@ in
}; };
startup = [ startup = [
{ command = "${ewwDaemon} --restart open bar-work"; always = true; } { command = "${ewwDaemon} --restart open bar-work"; always = true; }
{ command = "${pkgs.wayvnc}/bin/wayvnc 0.0.0.0"; always = true; } # { command = "${pkgs.wayvnc}/bin/wayvnc 0.0.0.0"; always = true; }
]; ];
workspaceOutputs = workspacePartition; workspaceOutputs = workspacePartition;
extraKeybindings = { extraKeybindings = {