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

Bug: Nixos not rebuilding after regreet was added to stylix #577

Closed
psynyde opened this issue Sep 27, 2024 · 15 comments
Closed

Bug: Nixos not rebuilding after regreet was added to stylix #577

psynyde opened this issue Sep 27, 2024 · 15 comments

Comments

@psynyde
Copy link

psynyde commented Sep 27, 2024

I'm creating this issue for who are facing this error below or something similar even though their system doesn't use regreet at.

       error: The option `programs.regreet.cursorTheme' does not exist. Definition values:
       - In `/nix/store/k5zm4zdrgbn0483a4pxgz1pb49a266hm-modules/regreet/nixos.nix':
           {
             _type = "if";
             condition = false;
             content = {
               name = "macOS-BigSur-White";

changing stylix input to github:danth/stylix/cf8b6e2d4e8aca8ef14b839a906ab5eb98b08561.
should fix the issue.

I assume the main issue is nixpkgs-unstable introduced more customization to regreet which isn't available on stable (ie. 24.05) The input above points to the commit before regreet was introduced in styix.

@psynyde psynyde changed the title Bug: Nixos not rebuilding after adding regreet to stylix Bug: Nixos not rebuilding after regreet was added to stylix Sep 27, 2024
@trueNAHO
Copy link
Collaborator

I assume the main issue is nixpkgs-unstable introduced more customization to regreet which isn't available on stable.

Do you mean by "stable", the nixos-*.* (like nixos-24.05) Nixpkgs branches? IIRC, regular feature additions are not backported from nixos-unstable to these branches. In other words, this option is intentionally lacking.

I'm creating this issue who are facing this error below or something similar even though their system doesn't use regreet at at.

Either way, thanks for posting this for reference.

In the future, #543 would partially resolve similar issues.

I will close this issue, as I don't think there is much Stylix can do about this at this point. Feel free to re-open, if I am wrong on this.

@trueNAHO trueNAHO closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
@Kernald
Copy link

Kernald commented Sep 29, 2024

Setting stylix.targets.regreet.enable to false doesn't help on NixOS 24.05. Does this mean there's no way to update Stylix past cf8b6e2 until switching to 24.11 or unstable?

@trueNAHO
Copy link
Collaborator

Setting stylix.targets.regreet.enable to false doesn't help on NixOS 24.05. Does this mean there's no way to update Stylix past cf8b6e2 until switching to 24.11 or unstable?

I see your use case. Maybe we could backport to release-24.5 a check whether the regreet package exists. @danth, what do you think?

@sigboe
Copy link

sigboe commented Oct 2, 2024

Basically, can't update stylix, past the update that added regreet, because stylix is set to expect regreet to have options that are only available in nixpkg-unstable.

So the options don't exist so stylix fails the build.

It's not relevant if you have regreet enabled or not, and it's not relevant if you have regreet installed or not.

Right now stylix 24.05 doesn't work.

If you check programs.regreet in search.nixos.org/options and compare what options are available in 24.05 and unstable, there are more options in unstable. Hopefully these options can be removed from stylix 24.05.

Thank you!

@trueNAHO
Copy link
Collaborator

trueNAHO commented Oct 3, 2024

Basically, can't update stylix, past the update that added regreet, because stylix is set to expect regreet to have options that are only available in nixpkg-unstable.

So the options don't exist so stylix fails the build.

It's not relevant if you have regreet enabled or not, and it's not relevant if you have regreet installed or not.

I already mentioned this:

In the future, #543 would partially resolve similar issues.

Right now stylix 24.05 doesn't work.

If you check programs.regreet in search.nixos.org/options and compare what options are available in 24.05 and unstable, there are more options in unstable. Hopefully these options can be removed from stylix 24.05.

What do you mean by "stylix 24.05"?

If you mean the release-24.05 Stylix branch, then this should not be an issue because it does not have a regreet module. If you mean that you are explicitly overriding Stylix's github:NixOS/nixpkgs/nixpkgs-unstable input with github:NixOS/nixpkgs/nixos-24.05 (which is clearly behind the Nixpkgs version Stylix master supports), then there is obviously a version mismatch possibility beyond Stylix's control. Note that Stylix deliberately updates (unless we forget to do so) its flake.lock versions when using features that are not already available in the current flake.lock versions.

Similar to Nixpkgs and Home Manager, Stylix supports only the latest versions from flake.lock, unless logically necessary. For example, Nixpkgs provides simultaneously several nodejs versions.

@sigboe
Copy link

sigboe commented Oct 3, 2024

@trueNAHO Thanks for answering.
with

inputs = {
  nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
  stylix = {
    url = "github:danth/stylix";
    inputs.nixpkgs.follows = "nixpkgs";
  };
};

Which I assume means I get stylix/release-24.05? (please advice)
But when I do a nix flake update I get this issue, where stylix expects regreet options from nixos-unstable

nixpkgs 24.05:

        programs.regreet.settings
        programs.regreet.package
        programs.regreet.enable
        programs.regreet.extraCss
        programs.regreet.cageArgs

nixpkgs unstable:

        programs.regreet.settings
        programs.regreet.package
        programs.regreet.enable
        programs.regreet.theme.name
        programs.regreet.font.size
        programs.regreet.font.name
        programs.regreet.iconTheme.name
        programs.regreet.cursorTheme.name
        programs.regreet.theme.package
        programs.regreet.iconTheme.package
        programs.regreet.font.package
        programs.regreet.extraCss
        programs.regreet.cursorTheme.package
        programs.regreet.cageArgs

@LovingMelody
Copy link

@sigboe unsure if you are having this problem, but no you are pulling the master branch for Stylix. You would need to adjust stylix.url to be github:danth/stylix/release-24.05

@dmarcoux
Copy link

dmarcoux commented Oct 7, 2024

I encountered this issue today after updating my flake.lock file. I have the following inputs:

inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";

    nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";

    stylix = {
      url = "github:danth/stylix";
      inputs.nixpkgs.follows = "nixpkgs-unstable";
    };
};

I use nixpkgs for most of my configuration, but sometimes I rely on nixpkgs-unstable for a specific software/app. This should work, right?

@LovingMelody
Copy link

That will only make the flake use packages from unstable but not the nixosModules. You would need to define your system with unstable instead of stable or as previously stated use the stable branch of stylix that matches your nixpkgs.

dmarcoux added a commit to dmarcoux/dotfiles that referenced this issue Oct 7, 2024
I would prefer to follow nixpkgs-unstable for stylix, but it breaks
right now due to a mismatch in settings for a few packages. Since most
of my NixOS config is on the stable release, it's not possible to use
the master/main branch of stylix without issues like this:

danth/stylix#577
Tygo-van-den-Hurk added a commit to Tygo-van-den-Hurk/NixOS that referenced this issue Oct 15, 2024
…here the system wouldn't switch to the new configuration. See: 'danth/stylix#577'.
Torwalt added a commit to Torwalt/nix-config that referenced this issue Oct 16, 2024
hahuang65 added a commit to hahuang65/nixos-config that referenced this issue Oct 17, 2024
binarin added a commit to binarin/stylix that referenced this issue Nov 16, 2024
Apparently `../modules` is creating a separate derivation that
contains only that folder, so it's now separate from the flake source.
But this transient derivation isn't mentioned explicitly in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
danth#577 locally, by just adding
the following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];
binarin added a commit to binarin/stylix that referenced this issue Nov 16, 2024
Apparently `../modules` is creating a separate derivation that
contains only that folder, so it's now separate from the flake source.
But this transient derivation isn't mentioned explicitly in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
danth#577 locally, by just adding
the following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];
binarin added a commit to binarin/stylix that referenced this issue Nov 16, 2024
Apparently `../modules` is creating a separate derivation that
contains only that folder, so it's now separate from the flake source.
But this transient derivation isn't mentioned explicitly in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
danth#577 locally, by just adding
the following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];
binarin added a commit to binarin/stylix that referenced this issue Nov 16, 2024
Apparently `../modules` is creating a separate derivation that
contains only that folder, so it's now separate from the flake source.
But this transient derivation isn't mentioned explicitly in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
danth#577 locally, by just adding
the following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];
binarin added a commit to binarin/stylix that referenced this issue Nov 16, 2024
Apparently `../modules` is creating a separate derivation that
contains only that folder, so it's now separate from the flake source.
But this transient derivation isn't mentioned explicitly in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
danth#577 locally, by just adding
the following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];
binarin added a commit to binarin/stylix that referenced this issue Nov 16, 2024
Apparently `../modules` is creating a separate derivation that
contains only that folder, so it's now separate from the flake source.
But this transient derivation isn't mentioned explicitly in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
danth#577 locally, by just adding
the following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];
trueNAHO pushed a commit that referenced this issue Nov 17, 2024
Apparently `../modules` is creating a separate derivation that contains
only that folder, so it's now separate from the flake source. But this
transient derivation isn't mentioned explicitly anywhere in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
#577 locally, by just adding the
following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];

Reviewed-by: Daniel Thwaites <[email protected]>
Reviewed-by: NAHO <[email protected]>
mateusauler pushed a commit to mateusauler/stylix that referenced this issue Nov 20, 2024
…nth#631)

Apparently `../modules` is creating a separate derivation that contains
only that folder, so it's now separate from the flake source. But this
transient derivation isn't mentioned explicitly anywhere in the flake
outputs. It makes it impossible to target those modules in
`disabledModules` directive.

For example, after this change is applied, users can solve issues like
danth#577 locally, by just adding the
following snippet to their configuration:

    disabledModules = [ "${inputs.stylix}/modules/regreet/nixos.nix" ];

Reviewed-by: Daniel Thwaites <[email protected]>
Reviewed-by: NAHO <[email protected]>
@zmitchell
Copy link

I'm running into this now and I'm a little unclear about what I should expect from the main branch. I totally understand having the release-24.05 branch (and its inputs) be set to specific revisions, and I totally understand that things will break if a user overrides the nixpkgs input with a follows.

Should I expect main to work though? I'm hitting this error on main without overriding the nixpkgs input.

@trueNAHO
Copy link
Collaborator

I'm running into this now and I'm a little unclear about what I should expect from the main branch. I totally understand having the release-24.05 branch (and its inputs) be set to specific revisions, and I totally understand that things will break if a user overrides the nixpkgs input with a follows.

Should I expect main to work though?

Ideally, yes.

I'm hitting this error on main without overriding the nixpkgs input.

Does commit 7689e62 resolve the issue?

@zmitchell
Copy link

It doesn't

@trueNAHO
Copy link
Collaborator

trueNAHO commented Dec 4, 2024

Is this issue resolved by updating to release-24.11?

@suderman
Copy link

suderman commented Dec 5, 2024

Changing my flake input fixed my stable NixOS systems:

stylix.url = "github:danth/stylix/release-24.11";

@trueNAHO
Copy link
Collaborator

trueNAHO commented Dec 5, 2024

Closing this issue, as it seems to be resolved in release-24.11.

@trueNAHO trueNAHO closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
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

8 participants