1

Modules/Hyprland: Ensure hypr-utils only start on hyprland session

This commit is contained in:
2025-11-13 21:11:03 +01:00
parent 28d0196a25
commit df93b8f1f4
3 changed files with 12 additions and 15 deletions

View File

@ -113,20 +113,6 @@ in {
programs = {
hyprlock = import ./hyprlock.nix {inherit config hyprland color;};
# TODO: IMV shouldn't be part of the hyprland module
imv = {
enable = true;
settings = {
options = {
background = "${color.hex.base}";
overlay = true;
overlay_font = "${color.font}:12";
overlay_background_color = "${color.hex.accent}";
overlay_text_color = "${color.hex.accentText}";
};
};
};
};
services = {
@ -136,6 +122,16 @@ in {
hyprpaper = import ./hyprpaper.nix {inherit config hyprland color;};
};
# Make sure the units only start when using Hyprland
systemd.user.services.dunst.Unit.After = lib.mkIf hyprland.dunst.enable (lib.mkForce ["hyprland-session.target"]);
systemd.user.services.dunst.Unit.PartOf = lib.mkIf hyprland.dunst.enable (lib.mkForce ["hyprland-session.target"]);
systemd.user.services.hypridle.Install.WantedBy = lib.mkForce ["hyprland-session.target"];
systemd.user.services.hypridle.Unit.After = lib.mkForce ["hyprland-session.target"];
systemd.user.services.hypridle.Unit.PartOf = lib.mkForce ["hyprland-session.target"];
systemd.user.services.hyprpaper.Install.WantedBy = lib.mkForce ["hyprland-session.target"];
systemd.user.services.hyprpaper.Unit.After = lib.mkForce ["hyprland-session.target"];
systemd.user.services.hyprpaper.Unit.PartOf = lib.mkForce ["hyprland-session.target"];
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;