danth / stylix

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

Stylix stoped working after update #430

Closed LichHunter closed 1 week ago

LichHunter commented 2 weeks ago

Hi all, sorry if this issue was already discussed but I did tried to research it and looking through issues here and sitllI have troubles with stylix after updating it. Here is what I use currently in flake.lock

"stylix": {
  "inputs": {
    "base16": "base16",
    "base16-fish": "base16-fish",
    "base16-foot": "base16-foot",
    "base16-helix": "base16-helix",
    "base16-kitty": "base16-kitty",
    "base16-tmux": "base16-tmux",
    "base16-vim": "base16-vim",
    "flake-compat": "flake-compat_3",
    "gnome-shell": "gnome-shell",
    "home-manager": "home-manager_2",
    "nixpkgs": "nixpkgs_6"
  },
  "locked": {
    "lastModified": 1716895458,
    "narHash": "sha256-W9Y/+K4L7JcF5xcXO4MVGQk/0DgzHrp/IjlHyLeYExY=",
    "owner": "danth",
    "repo": "stylix",
    "rev": "5234b3d467aa803ad8d3fe898ef5673246045984",
    "type": "github"
  },
  "original": {
    "owner": "danth",
    "repo": "stylix",
    "type": "github"
  }
},

After update to latest version using nix flake update, it stopped working. I tried stylix.enable=true in home-manager and nix config and still theme, that I was using previously, is not applied to firefox and wofi. I tried stylix.autoEnable=true and I got this error rebuilding nixos:

error: builder for '/nix/store/8bxy3ckxc6z5ldzpim3a504rmwsflhhk-image.png.drv' failed with exit code 1; last 2 log lines:

convert: unrecognized color null' @ warning/color.c/QueryColorCompliance/2380. convert: no images defined/nix/store/nf8mmr8zdjgls532spzhfaa0hy61mldq-image.png' @ error/convert.c/ConvertImageCommand/3362. For full logs, run 'nix log /nix/store/8bxy3ckxc6z5ldzpim3a504rmwsflhhk-image.png.drv'. error: 1 dependencies of derivation '/nix/store/vn45md2pz1yhkbnkhh1vrmqsz391gq8d-hm-dconf.ini.drv' failed to build error: 1 dependencies of derivation '/nix/store/jkmj6ldn34v4jh4i9g5pfj2l6r8sj0r0-activation-script.drv' failed to build error: 1 dependencies of derivation '/nix/store/17wxl20ip7pmhij74y03k1z2wq893jfv-home-manager-generation.drv' failed to build error: 1 dependencies of derivation '/nix/store/yk54fnwh0lnyh3hlp78m9jvf750hs7kz-unit-home-manager-omen.service.drv' failed to build error: 1 dependencies of derivation '/nix/store/i9lhig5f9yqzvxkp79dadbgc4il2f7jl-system-units.drv' failed to build error: 1 dependencies of derivation '/nix/store/i0gk7i5k0ax1a01kihgqijc776ybv2d7-etc.drv' failed to build error: 1 dependencies of derivation '/nix/store/fsq20f3ja8kmnn049hcpqrnmk3bkgfw5-nixos-system-nixos-24.11.20240612.57d6973.drv' failed to build

Also here is my nixos system info:

╰─$ nix-shell -p nix-info --run "nix-info -m"

  • system: "x86_64-linux"
  • host os: Linux 6.6.32, NixOS, 24.11 (Vicuña), 24.11.20240612.57d6973
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.18.2
  • channels(root): "nixos-23.11, unstable"
  • nixpkgs: /nix/store/dydg48djlykksz8cxq0xjplyxpa9pvf4-source

If you would need any more info will be happy to provide it.

Thanks in advance

paladhammika commented 2 weeks ago

A new option was added in a recent commit #244

Integrating stylix.enable = true; into my NixOS configuration solved any theming issues for me.

trueNAHO commented 2 weeks ago

not applied to firefox

The Firefox module is guarded by

https://github.com/danth/stylix/blob/a7fbda1fd965cc22e62463896a4af0342cb00e6a/modules/firefox/hm.nix#L25

Here are the relevant definitions:

https://github.com/danth/stylix/blob/a7fbda1fd965cc22e62463896a4af0342cb00e6a/stylix/target.nix#L5-L15

https://github.com/danth/stylix/blob/a7fbda1fd965cc22e62463896a4af0342cb00e6a/modules/firefox/hm.nix#L14-L16

https://github.com/danth/stylix/blob/a7fbda1fd965cc22e62463896a4af0342cb00e6a/stylix/target.nix#L34-L47

    "rev": "5234b3d467aa803ad8d3fe898ef5673246045984",

I tried stylix.enable=true

Your Stylix input does not contain the stylix.enable commit: https://github.com/danth/stylix/compare/5234b3d467aa803ad8d3fe898ef5673246045984...7682713f6af1d32a33f8c4e3d3d141af5ad1761a.

LichHunter commented 1 week ago

Hi, Yeah as I mentioned I did try stylix.enable=true in the latest update and theming still did not work. Sorry if this was not clear. Perhaps these links to my config would help:

I was adding stylix.enable=true option in both places with no result

trueNAHO commented 1 week ago

I tried stylix.enable=true in home-manager and nix config and still theme, that I was using previously, is not applied to firefox and wofi.

I tried stylix.autoEnable=true and I got this error rebuilding nixos:

If I understood correctly, one of the commits from 5234b3d467aa803ad8d3fe898ef5673246045984...73c6955b4572346cc10f43a459949fe646efbde0 is not applying the theming to (at least) Firefox and Wofi with stylix.enable = true;, and crashes with stylix = { enable = true; autoEnable = true; };.

Could you try to find the faulty Stylix commit, as described in https://github.com/danth/stylix/issues/324#issuecomment-2034526122? Maybe focus on the ca3247ed8cfbf369f3fe1b7a421579812a95c101...e59d2c1725b237c362e4a62f5722f5b268d566c7 commits.

janpawlowskiof commented 1 week ago

EDIT: It seems that there is some other mistake, probably on my end, as neither of mentioned commits seem to work for me. EDIT 2: Yes it was, I was not loading stylix in home manager properly. Sorry for trouble.

Hi! Maybe my case is relevant as well here? (sorry if not)

I am super new to NixOS and to Stylix, but I just installed Stylix on my fresh NixOS with gnome and while I am getting themed TTY, and some elements of gnome, all of the apps are not not themed and the wallpaper is not changed as well.

My config is here. I am only now experimenting with nixos, so forgive me the mess.

Here are relevant screenshots.

themed TTY Not themed apps 2

LichHunter commented 1 week ago

Hi, sorry for long response. I've been doing investigation on my side and found that issue for me lies in this commit It changed accent colors for gtk, so wofi and firefox now has strange blue color instead of orange-ish like it used to in gruvbox-dark-hard theme I would assume I can change it if I want?

LichHunter commented 1 week ago

As I see this color changed was discussed and agreed. It doesn't work for me so I've forked project and reverted changed. By the way I was finally able to fix error related to image.png.drv. Solution was in using existing wallpaper, as before I was using "generated" (I think it just didn't work and image didn't exist at all). Now stylix.autoEnable works just fine

Thanks for all help and comments closing issue

trueNAHO commented 1 week ago

It changed accent colors for gtk, so wofi and firefox now has strange blue color instead of orange-ish like it used to in gruvbox-dark-hard theme

In the future, https://github.com/danth/stylix/issues/249 should resolve such inconsistencies.

As I see this color changed was discussed and agreed. It doesn't work for me so I've forked project and reverted changed.

This is a somewhat already acknowledged problem:

the use of extraConfig might cause other potentially related issues. As discussed in #159 (comment), it makes it harder to override options, and as discussed in #388 (comment), it makes it easier to accidentally override Stylix options.

-- https://github.com/danth/stylix/issues/395