danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
1.2k stars 153 forks source link

Stylix not applying styles to system when zsh home-manager module enabled #609

Open velen2077 opened 5 days ago

velen2077 commented 5 days ago

I'm seeing a strange issue on nixos regarding stylix. When I have the home-manager module for zsh loaded, stylix fails to apply some settings to my nixos system. I get the wallpaper and cursors, but upon opening GNOME Files for instance, the theme colours do not apply and dark mode is ignored. Windows appear light. As soon as I disable the zsh home-manager module, the settings take effect just fine.

This is on nixos 2.24.10. Nixpkgs-unstable, stlyix follows nixpkgs. GNOME desktop environment.

I have a pretty simple zsh and stylix setup. Linked below:

https://github.com/velen2077/mega-dots

Below is my home config for my user. You can see zsh is set to true. If I change this to false (effectively disabling zsh home-manager module) the styles work fine.

https://github.com/velen2077/mega-dots/blob/main/homes/x86_64-linux/velen2077%40endgame/default.nix

Here is the stylix config:

https://github.com/velen2077/mega-dots/blob/main/modules/home/stylix/default.nix

And here is the zsh config:

https://github.com/velen2077/mega-dots/blob/main/modules/home/zsh/default.nix

trueNAHO commented 5 days ago

I'm seeing a strange issue on nixos regarding stylix. When I have the home-manager module for zsh loaded, stylix fails to apply some settings to my nixos system. I get the wallpaper and cursors, but upon opening GNOME Files for instance, the theme colours do not apply and dark mode is ignored. Windows appear light. As soon as I disable the zsh home-manager module, the settings take effect just fine.

Without digging through some source code, I am not sure what is causing this weird behaviour. Silly question: Did you try rebooting?

@danth, do you maybe know what is causing this?

velen2077 commented 5 days ago

I'm seeing a strange issue on nixos regarding stylix. When I have the home-manager module for zsh loaded, stylix fails to apply some settings to my nixos system. I get the wallpaper and cursors, but upon opening GNOME Files for instance, the theme colours do not apply and dark mode is ignored. Windows appear light. As soon as I disable the zsh home-manager module, the settings take effect just fine.

Without digging through some source code, I am not sure what is causing this weird behaviour. Silly question: Did you try rebooting?

@danth, do you maybe know what is causing this?

Hey @trueNAHO - yeah I tried a reboot. I also tried a build-vm that I use for testing. Same thing. It's really weird. I have a 'develop' branch in my repo with the zsh home-manager module disabled. That works perfectly. Windows get tinted fine, font and spacing applies as normal. As soon as I toggle it on, half the styles don't apply - most notably the polarity is not set to dark and windows appear as if they were in light mode, despite GNOME also respecting the 'Dark Mode' toggle.

velen2077 commented 5 days ago

I should probably also note that zsh installed in nixos through nixos module has zero impact on this. I still have zsh enabled in nixos, but without my customisations. That seems to have no impact on stylix. It just seems to be when turning it on in home-manager. I've tried stripping the home-manager zsh config down to basics (i.e. just programs.zsh = enable;) and it still breaks, so it's not plugin or additional option related I don't think.