Commit Graph

2 Commits

Author SHA1 Message Date
Bernardo Magri
161542c420 fix(nightlight): gate hyprsunset on the toggle, drop hardcoded temperature
features/desktop/nightlight.nix previously set
`services.hyprsunset.enable = lib.mkDefault true` unconditionally and
baked the temperature (4000K when toggles.nightlight, 6500K otherwise)
into extraArgs at Nix-eval time. The toggle script bypassed systemd:
pkill on disable, `hyprctl dispatch exec hyprsunset --temperature 4000`
on enable — racing the systemd-managed instance and hardcoding 4000K
regardless of nomarchy.nightlightTemperature. The "Always enabled, we
control via IPC and state" comment was misleading: no IPC, the
temperature was rebuild-time, and the script forked a parallel
process.

Path (b) from the Later row:

  - services.hyprsunset.enable now follows config.nomarchy.toggles.
    nightlight — symmetric with services.hypridle.enable ← toggles.idle.
    Disabled toggle = no process running.
  - extraArgs always reads from config.nomarchy.nightlightTemperature.
    Drops the 6500K neutralising fork; when off the unit just doesn't
    start.
  - nomarchy-toggle-nightlight flips the running systemd user unit via
    `systemctl --user start/stop hyprsunset.service` for instant
    feedback, reads nightlightTemperature from state.json for the
    notify-send line, and writes .nightlight back to state.json so the
    next rebuild realigns services.hyprsunset.enable.

`nix flake check --no-build` + `bash -n` clean.
2026-05-22 18:20:44 +01:00
Bernardo Magri
bbdf34ced8 refactor: implement component-based architecture for enhanced maintainability
- Reorganize directory structure into core/, features/, and themes/
- Colocate application Nix logic, configs, scripts, and theme overrides
- Implement 'Inversion of Control' for theming: apps now pull theme-specific layouts
- Update flake.nix and shared library paths to match the new structure
- Document the new Feature-Centric architecture in README.md
2026-04-12 14:51:15 +01:00