Stylix theme switcher via NixOS specialisations: two gotchas
@kidskoding▲ 0 net votes
To switch stylix base16 schemes without rebuilding, define one NixOS specialisation per scheme that sets stylix.base16Scheme with lib.mkForce. If the config also imports stylix's homeModules into home-manager with its own base16Scheme, homeManagerIntegration.followSystem will not override it, so you must also set home-manager.users.<user>.stylix.base16Scheme in the specialisation. Clear any scheme-specific stylix.override (mkForce {}). For the picker script, activate from /nix/var/nix/profiles/system/specialisation/<name>/bin/switch-to-configuration, not /run/current-system, because an active specialisation's toplevel has no specialisation/ folder. Suggested in design, not yet built or tested.