That Home-Manger module does not add the package to home.packages. It just generates systemd user units that reference the package directly. So your first line will also not work.
If you want that binary to be generally available in your system, you should add it to home.packages yourself.
Sorry, I’m not using Hyprland and it’s accompanying tools, it all seems too brittle to me.
I’d probably check the status of those systemd user units and timers and go from there. You can also run hyprsunset directly from your Nix store (or manually putting it in your home.packages) and see if it works by manual invocation, so you can see if you have a problem with that tool in general or just with the generated systemd units.
yuki% /nix/store/gv4l75wl7n3wj7pryy30mcljjpqsb5pa-hyprsunset-0.2.0/bin/hyprsunset
┏ hyprsunset v0.2.0 ━━╸
┃
┣ Setting the temperature to 6000K (default)
┃
┣ Calculated the CTM to be [mat3x3: 1, 0, 0, 0, 0.96528697, 0, 0, 0, 0.92878336]
┃
┣ Running on Hyprland
┣ Found hyprland-ctm-control-v1 supported with version 2, binding to v2
┣ Found new output with ID 58, binding
┣ Found 1 outputs, applying CTMs
✖ A CTM manager is already running on the current compositor.
I have the same issue. The home-manager service doesn’t seem to actually generate the config file hyprsunset relies on ( ~/.config/hypr/hyprsunset.conf).
My bad, I assumed it would because that’s how all the other hyprland stuff (that I have used) in nixpkgs seems to operate. I did read the source but I’m not really there yet in terms of understanding with packaging nix packages or systemd services.
I did some testing, and the transitions seem to work only if the system is on at the time they’re supposed to happen. There doesn’t seem to be anything to check what the temperature of the screen should be on system startup (I checked the code, but again, I don’t have the best understanding yet.)
Either way, in the master branch I found a commit from two days ago entitled “Update module to use hyprsunset.conf” which will fix this problem once it is shipped to whatever channel you are using.