{ config, lib, ... }: # hyprsunset (the blue-light filter) is gated on `nomarchy.toggles.nightlight` # so a disabled toggle means no process runs — symmetric with how # `services.hypridle.enable` is wired off `toggles.idle`. The temperature # comes from `nomarchy.nightlightTemperature`, evaluated at Nix-eval time # and baked into `extraArgs`. The toggle script (themes/engine/scripts/ # nomarchy-toggle-nightlight) writes both the toggle and the same # temperature value into state.json and flips the systemd unit for # instant feedback; the next rebuild's HM activation realigns systemd # with the persistent state. { services.hyprsunset = { enable = lib.mkDefault config.nomarchy.toggles.nightlight; extraArgs = lib.mkDefault [ "--temperature" (toString config.nomarchy.nightlightTemperature) ]; }; }