feat: add hyprsunset service

This commit is contained in:
Youwen Wu 2025-04-04 00:56:55 -07:00
parent 46f708b8e0
commit dec206f1ec
Signed by: youwen
GPG key ID: 865658ED1FE61EC3
2 changed files with 26 additions and 0 deletions

View file

@ -58,6 +58,13 @@ in
Monitor to use for screen locker. Use `hyprctl monitors` to determine. 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 { config = lib.mkIf cfg.enable {

View file

@ -9,6 +9,25 @@ let
in in
{ {
config = lib.mkIf cfg.enable { 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; services.hyprpaper.enable = true;
programs.wlogout.enable = true; programs.wlogout.enable = true;