home-manager/programs/hypridle: set systemd service correctly for uwsm

This commit is contained in:
Anthony Rodriguez 2024-12-27 23:15:57 +01:00
parent c06597fe7f
commit 1dc4024973
Signed by: nezia
GPG key ID: EE3BE97C040A86CE

View file

@ -1,6 +1,8 @@
{
inputs,
pkgs,
lib,
config,
...
}: {
services.hypridle = {
@ -33,4 +35,21 @@
];
};
};
# needed when using uwsm as the session manager
systemd.user.services."hypridle" = lib.mkForce {
Unit = {
Description = "Hyprland's Idle Daemon";
After = "graphical-session.target";
X-Restart-Triggers = ["${config.xdg.configFile."hypr/hypridle.conf".source}"];
};
Service = {
Type = "exec";
ExecStart = lib.getExe pkgs.hypridle;
Restart = "on-failure";
Slice = "background-graphical.slice";
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
}