hypr: move session daemons from exec-once to systemd user services

Replace the hl.exec_cmd autostart block with declarative home-manager
services so the desktop shell has proper ordering and lifecycle:

- services.hyprpaper (with settings) for hyprpaper
- services.cliphist for the text/image clipboard watchers
- services.hyprpolkitagent for the polkit agent
- programs.quickshell.systemd for the quickshell shell
- a hand-written systemd.user.services.mako (home-manager has no unit)

All are tied to config.wayland.systemd.target (graphical-session.target),
which start-hyprland already activates. No UWSM required.
This commit is contained in:
2026-09-19 00:31:18 -07:00
parent 598a43eace
commit fb743d7353
4 changed files with 70 additions and 31 deletions

View File

@@ -1,5 +1,4 @@
{
pkgs,
lib,
config,
...
@@ -282,24 +281,12 @@ in
];
# -----------------------------------------------------------------------
# 6. Autostart Daemons & Apps (hl.on)
# 6. Autostart Daemons & Apps
# -----------------------------------------------------------------------
on = [
{
_args = [
"hyprland.start"
(mkLua ''
function()
hl.exec_cmd("qs")
hl.exec_cmd("hyprpaper")
hl.exec_cmd("mako")
hl.exec_cmd("wl-paste --type text --watch cliphist store")
hl.exec_cmd("wl-paste --type image --watch cliphist store")
hl.exec_cmd("${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent")
end'')
];
}
];
# Desktop daemons (quickshell, hyprpaper, mako, cliphist and the
# polkit agent) are declared as systemd user services in
# home/hypr/services.nix and home/hypr/quickshell.nix, tied to the
# Wayland session target instead of exec-once.
# -----------------------------------------------------------------------
# 7. Keybindings (hl.bind)