{ config, lib, pkgs, ... }: { options.zpha.services.wlsunset.enable = lib.mkEnableOption "batsignal"; config = lib.mkIf config.zpha.services.wlsunset.enable { users.users.zaphyra.maid = { systemd.services.batsignal = { description = "Day/night gamma adjustments for Wayland compositors."; after = [ "niri-session.target" ]; partOf = [ "niri-session.target" ]; wantedBy = [ "niri-session.target" ]; unitConfig.ConditionEnvironment = "WAYLAND_DISPLAY"; serviceConfig = { Restart = "on-failure"; ExecStart = let args = lib.cli.toCommandLineShellGNU { } { t = 3000; T = 4500; l = "8.26"; L = "49.01"; }; in "${lib.getExe pkgs.wlsunset} ${args}"; }; }; }; }; }