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.
38 lines
987 B
Nix
38 lines
987 B
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
# The Wayland session target used by the home-manager Wayland modules
|
|
# (resolves to graphical-session.target). start-hyprland activates it.
|
|
sessionTarget = config.wayland.systemd.target;
|
|
in
|
|
{
|
|
# PolicyKit agent (replaces the old hl.exec_cmd autostart).
|
|
services.hyprpolkitagent.enable = true;
|
|
|
|
# Clipboard history. The module runs both the text and image watchers as
|
|
# systemd user services and adds the cliphist package.
|
|
services.cliphist.enable = true;
|
|
|
|
# mako has no systemd service in home-manager, so declare one here.
|
|
# Configuration lives next to the rest of the desktop theme in default.nix.
|
|
systemd.user.services.mako = {
|
|
Unit = {
|
|
Description = "mako notification daemon";
|
|
After = [ sessionTarget ];
|
|
PartOf = [ sessionTarget ];
|
|
};
|
|
|
|
Service = {
|
|
ExecStart = "${pkgs.mako}/bin/mako";
|
|
Restart = "always";
|
|
RestartSec = 2;
|
|
};
|
|
|
|
Install.WantedBy = [ sessionTarget ];
|
|
};
|
|
}
|