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 stoped working after update #430

Closed
LichHunter opened this issue Jun 14, 2024 · 8 comments
Closed

Stylix stoped working after update #430

LichHunter opened this issue Jun 14, 2024 · 8 comments

Comments

@LichHunter
Copy link

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

paladhammika commented Jun 16, 2024

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

trueNAHO commented Jun 16, 2024

not applied to firefox

The Firefox module is guarded by

config = lib.mkIf (config.stylix.enable && config.stylix.targets.firefox.enable) {

Here are the relevant definitions:

enable = lib.mkOption {
description = ''
Whether to enable Stylix.
When this is `false`, all theming is disabled and all other options
are ignored.
'';
type = lib.types.bool;
default = false;
example = true;
};

options.stylix.targets.firefox = {
enable =
config.lib.stylix.mkEnableTarget "Firefox" true;

stylix/stylix/target.nix

Lines 34 to 47 in a7fbda1

config.lib.stylix.mkEnableTarget = let
cfg = config.stylix;
in
humanName:
autoEnable:
lib.mkEnableOption
"theming for ${humanName}"
// {
default = cfg.enable && cfg.autoEnable && autoEnable;
example = !autoEnable;
}
// lib.optionalAttrs autoEnable {
defaultText = lib.literalMD "same as [`stylix.autoEnable`](#stylixautoenable)";
};

    "rev": "5234b3d467aa803ad8d3fe898ef5673246045984",

I tried stylix.enable=true

Your Stylix input does not contain the stylix.enable commit: 5234b3d...7682713.

@LichHunter
Copy link
Author

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

trueNAHO commented Jun 17, 2024

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 5234b3d...73c6955 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 #324 (comment)? Maybe focus on the ca3247e...e59d2c1 commits.

@janpawlowskiof
Copy link

janpawlowskiof commented Jun 18, 2024

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

LichHunter commented Jun 20, 2024

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

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

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, #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.

-- #395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants