Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
velen2077 opened this issue Nov 7, 2024 · 4 comments
Labels
bug Something isn't working properly

Comments

@velen2077
Copy link

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 trueNAHO added the bug Something isn't working properly label Nov 7, 2024
@trueNAHO
Copy link
Collaborator

trueNAHO commented Nov 7, 2024

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
Copy link
Author

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
Copy link
Author

velen2077 commented Nov 7, 2024

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.

@danth
Copy link
Owner

danth commented Dec 6, 2024

Can you check the logs for your Home Manager activation?

Either when activating the Home Manager configuration manually, or using journalctl -u home-manager-«username».service on NixOS.

Things can sometimes go wrong if there are conflicting files in your home directory, which causes Home Manager to not fully activate the configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

3 participants