diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 8857db03..e5cbc2a8 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -68,6 +68,19 @@ preload = ${config.stylix.image} wallpaper = ,${config.stylix.image} ''; + systemd.user.services.hyprpaper = { + Unit = { + Description = "Hyprland wallpaper utility"; + Wants = ["hyprland-session.target"]; + After = ["hyprland-session.target"]; + }; + Service = { + Environment = ["PATH=/run/current-system/sw/bin/:$PATH"]; + Restart = "always"; + ExecStart = "${pkgs.hyprpaper}/bin/hyprpaper"; + }; + Install.WantedBy = ["default.target"]; + }; wayland.windowManager.hyprland = { enable = true; xwayland.enable = true; @@ -91,7 +104,6 @@ exec-once = with config; [ "${wayland.windowManager.hyprland.finalPackage}/bin/hyprctl setcursor ${gtk.theme.name} ${toString gtk.cursorTheme.size}" "${pkgs.swaynotificationcenter}/bin/swaync" - "${pkgs.hyprpaper}/bin/hyprpaper" "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1" "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n" ];