diff --git a/hm/modules/linux/desktop-environment/hyprland/default.nix b/hm/modules/linux/desktop-environment/hyprland/default.nix index 9173803..059ccbe 100644 --- a/hm/modules/linux/desktop-environment/hyprland/default.nix +++ b/hm/modules/linux/desktop-environment/hyprland/default.nix @@ -58,6 +58,13 @@ in Monitor to use for screen locker. Use `hyprctl monitors` to determine. ''; }; + bluelight.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = '' + Whether to enable `hyprsunset` as a daemon. + ''; + }; }; config = lib.mkIf cfg.enable { diff --git a/hm/modules/linux/desktop-environment/hyprland/utilities.nix b/hm/modules/linux/desktop-environment/hyprland/utilities.nix index 5357528..e1c2b12 100644 --- a/hm/modules/linux/desktop-environment/hyprland/utilities.nix +++ b/hm/modules/linux/desktop-environment/hyprland/utilities.nix @@ -9,6 +9,25 @@ let in { config = lib.mkIf cfg.enable { + systemd.user.services = lib.mkIf cfg.bluelight.enable { + hyprsunset = { + Unit = { + Description = "Start the hyprsunset daemon"; + PartOf = "hyprland-session.target"; + After = "hyprland-session.target"; + }; + Service = { + Type = "simple"; + ExecStart = "${pkgs.hyprsunset}/bin/hyprsunset"; + Restart = "on-failure"; + RestartSec = 3; + }; + Install = { + WantedBy = [ "hyprland-session.target" ]; + }; + }; + }; + services.hyprpaper.enable = true; programs.wlogout.enable = true;