NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.96k stars 13.97k forks source link

[24.05] nixos/regreet: Unclear NixOS rebuild failure wiith `regreetd` package. #344915

Closed shymega closed 3 weeks ago

shymega commented 3 weeks ago

Describe the bug

A clear and concise description of what the bug is.

I updated my Flake lockfile for 24.05, and started having this error:

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 = "Vanilla-DMZ";
           ...

I've disabled greetd and switched back to GDM, but no joy. I can't get any other context, even with --show-trace. Due to restrictions, I am unable to release the source code to my NixOS flake.

I'm not actually sure what commit caused this regression, but when I did have greetd enabled, I used gtkgreet.

Steps To Reproduce

Unable to provide sources at this time.

Expected behavior

The NixOS configuration is to build correctly.

Screenshots

Logs provided above.

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.48-xanmod1, NixOS, 24.05 (Uakari), 24.05.20240925.759537f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.7`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

shymega commented 3 weeks ago

Apologies for not being able to provide configuration. I can try to extract sources if requested.

Atemu commented 3 weeks ago

It'd be best if you did that. Give us the minimal config that makes the error appear.

shymega commented 3 weeks ago

It's a very complex config. Even a minimal config would take a while to create.

However, I've rolled back the Nixpkgs inputs, and I've got a known working Flake on this 24.05 commit. There's no issues building on that commit. All of my configs use 24.05 as a base, and greetd is enabled in conjunction with the linked SHA-1.

EDIT: I thought it broke, but I'm just getting confused. Ignore the previous edit. It definitely builds with that linked SHA. I'm just getting confused.

Atemu commented 3 weeks ago

If this is indeed a regression and you know a good and bad revision, please do a first-parent git bisect between them.

shymega commented 3 weeks ago

Yep, will do as soon as I'm back at my workstation. Thank you, apologies for any confusion with my tests.

Atemu commented 3 weeks ago

You're going to have to figure out which part of your config sets the option anyways btw.

Atemu commented 3 weeks ago

I just noticed that the option set here does not exist on 24.05 yet. It's obviously going to fail if you try to set it. (Note that the module system intentionally checks for options definitions even if you "disable" them via mkIf.)

This looks like an error in your config to me.

shymega commented 3 weeks ago

Right, but I don't have any settings relating to regreetd. That's what is puzzling. Attached is my greetd config:

Can we re-open this?

default.nix.txt

Atemu commented 3 weeks ago

I am not able to repro this issue by including that config into mine (modulo duplicate settings).

Please cut your config down to the minimum config that actually reproduces the issue. In that process you're likely going to find an error in your config.

I'd start by grepping your config for cursorTheme. If it's any more than 0 results, there's your issue.

I closed this issue because the issue you're seeing could not possibly be caused by NixOS 24.05 because the option simply does not exist in that version. Attempting to use a non-existant option is user error no matter how you look at it.

aswan89 commented 3 weeks ago

@shymega If you are using stylix it looks like your problem is being caused by the interaction of nixpkgs updates and stylix's inclusion of said updates: https://github.com/danth/stylix/issues/577

shymega commented 3 weeks ago

Sorry for my silence. I was preparing a repo which has two branches for working out where the issue is - but, I would never have guessed it was Stylix.

It does appear to build now, thank you for the heads-up @aswan89! I think there's a lesson to be learned on my side here - cut down on dependencies.

I think we can close this as Resolved, given we've found a fix.

Atemu commented 3 weeks ago

This never was a nixpkgs issue to begin with.

shymega commented 3 weeks ago

Fair enough. Apologies.