Skip to content

nixos: Fix modules meta.maintainers issues - #484155

Merged
zowoq merged 2 commits into
NixOS:masterfrom
samueldr-at-cyberus:fix/nixos-module-maintainers-eval
Jan 27, 2026
Merged

zowoq merged 2 commits into
NixOS:masterfrom
samueldr-at-cyberus:fix/nixos-module-maintainers-eval

Conversation

@samueldr-at-cyberus

@samueldr-at-cyberus samueldr-at-cyberus commented Jan 26, 2026 •

Copy link
Copy Markdown
Contributor

The rationale is simple: this should work:

nix-instantiate --strict --eval --json ./nixos --arg configuration '{}' --attr config.meta.maintainers

It does not.

error:
       … while evaluating the attribute 'value'
         at /.../nixos-unstable/lib/modules.nix:1118:7:
         1117|     // {
         1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1119|       inherit (res.defsFinal') highestPrio;

       … while calling the 'addErrorContext' builtin
         at /.../nixos-unstable/lib/modules.nix:1118:15:
         1117|     // {
         1118|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |               ^
         1119|       inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'maintainers' missing
       at /.../nixos-unstable/nixos/modules/services/display-managers/dms-greeter.nix:297:42:
          296|
          297|   meta.maintainers = lib.teams.danklinux.maintainers;
             |                                          ^
          298| }

The first commit adds a check to prevent this from happening again. This became non-trivial, so this is pushed aside for a future PR.

The commits are fixing the issues encountered. The danklinux entries are self-evident, so no need to ping @LuckShiba about it I guess.

As for @M0ustach3, I took the liberty of using the casing from your GitHub username for your fixed maintainers-list entry, since handle == github is preferred. If that's not desirable, please tell me what to use instead.


Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

NOTE: Left everything other than the last item unchecked because this is purely eval-time, with apparently no current tests.

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion Discuss policies to work in and around Nixpkgs backport release-25.11 labels Jan 26, 2026
@samueldr-at-cyberus samueldr-at-cyberus changed the title nixos: Fixe modules maintainers issues, and add check nixos: Fix modules maintainers issues, and add check Jan 26, 2026
@samueldr-at-cyberus

This comment was marked as outdated.

@samueldr-at-cyberus
samueldr-at-cyberus force-pushed the fix/nixos-module-maintainers-eval branch from 3d8dac9 to 7884fca Compare January 26, 2026 22:34
@samueldr-at-cyberus

samueldr-at-cyberus commented Jan 26, 2026 •

Copy link
Copy Markdown
Contributor Author

With this most recent push, I hope the check fails in the expected manner(s).

We will be hitting previously uncaught issues.

EDIT: Well, no, because this is running as a workflow call so my changes aren't picked-up.


Since this became non-trivial, this will be split into at least three PRs:

  • The fixes the the modules
  • Fixing the GitHub action (overall)
  • Fixing nix flake check

Not sure where I'll be adding the new check, but I suppose it'll be in "fixing the GitHub action"...

Might even make sense to just remove the parallelism form the GitHub action and not be left responsible for whatever future issues crop-up

@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` and removed 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 26, 2026
Two different PRs, two different issues.

The first PR, chronologically-merged-in, NixOS#426687 introduced a new
module, and while reviewers “reviewed” the `meta.maintainers` entry,
they did not notice the maintainer was not in the maintainers list file.

 - NixOS#426687 (comment)

Then, in NixOS#437310, merged a few days later, another new module was added
with M0ustach3 as a maintainer. At the very least, an attempt was made
in de66c73 to add the maintainer to the
list, but an unfortunate typo (or two?) in the maintainers list entry
means the two intended usage of the new entry still don't work.

The issue here is not from the contributors. The reviewers and
committers could have done better, but it's not even truly their fault.
The issue is the meta information in NixOS modules was never checked. In
any way AFAICT. Otherwise this would have been caught immediately, and
not four months later.

Anyway, the intent clearly is that the entry should matche the GitHub
username.
@samueldr-at-cyberus
samueldr-at-cyberus force-pushed the fix/nixos-module-maintainers-eval branch from 7884fca to 43eca5c Compare January 27, 2026 01:05
@samueldr-at-cyberus samueldr-at-cyberus changed the title nixos: Fix modules maintainers issues, and add check nixos: Fix modules meta.maintainers issues Jan 27, 2026
@samueldr-at-cyberus
samueldr-at-cyberus marked this pull request as ready for review January 27, 2026 01:08
@nixpkgs-ci nixpkgs-ci Bot added 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` and removed 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions labels Jan 27, 2026

@LuckShiba LuckShiba left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad for using maintainers instead of members ^^', though I expected this to have been caught by any other CI

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jan 27, 2026
@samueldr-at-cyberus

Copy link
Copy Markdown
Contributor Author

My bad for using maintainers instead of members ^^', though I expected this to have been caught by any other CI

Exactly. The fact this is never checked in any form is quite surprising.

samueldr-at-cyberus added a commit to samueldr-at-cyberus/nixpkgs that referenced this pull request Jan 27, 2026
As observed in NixOS#484155, it was possible for broken meta information to
slip its way into the NixOS modules system. It looks like that data was
never checked. At this point I wonder if it ever was *used* in a
programmatic manner, given how long it took for it to get noticed.

This simple check causes the results to be evaluated in a format that
isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be
in the output, which is AFAICT undesirable.

```
 $ nix-instantiate --strict --eval --expr '{ x = a: a; }'
{ x = <LAMBDA>; }

 $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }'
error:
       … while evaluating attribute 'x'
         at «string»:1:3:
            1| { x = a: a; }
             |   ^

       error: cannot convert a function to JSON
       at «string»:1:3:
            1| { x = a: a; }
             |   ^
```
samueldr-at-cyberus added a commit to samueldr-at-cyberus/nixpkgs that referenced this pull request Jan 27, 2026
As observed in NixOS#484155, it was possible for broken meta information to
slip its way into the NixOS modules system. It looks like that data was
never checked. At this point I wonder if it ever was *used* in a
programmatic manner, given how long it took for it to get noticed.

This simple check causes the results to be evaluated in a format that
isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be
in the output, which is AFAICT undesirable.

```
 $ nix-instantiate --strict --eval --expr '{ x = a: a; }'
{ x = <LAMBDA>; }

 $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }'
error:
       … while evaluating attribute 'x'
         at «string»:1:3:
            1| { x = a: a; }
             |   ^

       error: cannot convert a function to JSON
       at «string»:1:3:
            1| { x = a: a; }
             |   ^
```
samueldr-at-cyberus added a commit to samueldr-at-cyberus/nixpkgs that referenced this pull request Jan 27, 2026
As observed in NixOS#484155, it was possible for broken meta information to
slip its way into the NixOS modules system. It looks like that data was
never checked. At this point I wonder if it ever was *used* in a
programmatic manner, given how long it took for it to get noticed.

This simple check causes the results to be evaluated in a format that
isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be
in the output, which is AFAICT undesirable.

```
 $ nix-instantiate --strict --eval --expr '{ x = a: a; }'
{ x = <LAMBDA>; }

 $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }'
error:
       … while evaluating attribute 'x'
         at «string»:1:3:
            1| { x = a: a; }
             |   ^

       error: cannot convert a function to JSON
       at «string»:1:3:
            1| { x = a: a; }
             |   ^
```
@M0ustach3

Copy link
Copy Markdown
Contributor

Awesome, thanks for the update on my name, I tried updating the typo on multiple occasions but no PR made it through unfortunately. I hope this will fix my username soon ! Thanks again.

Cheers,

@zowoq
zowoq added this pull request to the merge queue Jan 27, 2026
Merged via the queue into NixOS:master with commit dd3b179 Jan 27, 2026
30 of 33 checks passed
@nixpkgs-ci

nixpkgs-ci Bot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Backport failed for release-25.11, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.11
git worktree add -d .worktree/backport-484155-to-release-25.11 origin/release-25.11
cd .worktree/backport-484155-to-release-25.11
git switch --create backport-484155-to-release-25.11
git cherry-pick -x 5bb6317349abfe7569cc5a3831e63a5f6c054787 43eca5c08d72437a4caf90fdc89dc509f6621981

@samueldr-at-cyberus
samueldr-at-cyberus deleted the fix/nixos-module-maintainers-eval branch January 27, 2026 13:42
samueldr-at-cyberus added a commit to samueldr-at-cyberus/nixpkgs that referenced this pull request Jan 27, 2026
As observed in NixOS#484155, it was possible for broken meta information to
slip its way into the NixOS modules system. It looks like that data was
never checked. At this point I wonder if it ever was *used* in a
programmatic manner, given how long it took for it to get noticed.

This simple check causes the results to be evaluated in a format that
isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be
in the output, which is AFAICT undesirable.

```
 $ nix-instantiate --strict --eval --expr '{ x = a: a; }'
{ x = <LAMBDA>; }

 $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }'
error:
       … while evaluating attribute 'x'
         at «string»:1:3:
            1| { x = a: a; }
             |   ^

       error: cannot convert a function to JSON
       at «string»:1:3:
            1| { x = a: a; }
             |   ^
```
nixpkgs-ci Bot pushed a commit that referenced this pull request Jan 27, 2026
As observed in #484155, it was possible for broken meta information to
slip its way into the NixOS modules system. It looks like that data was
never checked. At this point I wonder if it ever was *used* in a
programmatic manner, given how long it took for it to get noticed.

This simple check causes the results to be evaluated in a format that
isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be
in the output, which is AFAICT undesirable.

```
 $ nix-instantiate --strict --eval --expr '{ x = a: a; }'
{ x = <LAMBDA>; }

 $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }'
error:
       … while evaluating attribute 'x'
         at «string»:1:3:
            1| { x = a: a; }
             |   ^

       error: cannot convert a function to JSON
       at «string»:1:3:
            1| { x = a: a; }
             |   ^
```

(cherry picked from commit f58b11e)
Gigahawk pushed a commit to Gigahawk/nixpkgs that referenced this pull request Jan 30, 2026
As observed in NixOS#484155, it was possible for broken meta information to
slip its way into the NixOS modules system. It looks like that data was
never checked. At this point I wonder if it ever was *used* in a
programmatic manner, given how long it took for it to get noticed.

This simple check causes the results to be evaluated in a format that
isn't "Nix-brained". Not using `--json` *could* allow `<LAMBDA>` to be
in the output, which is AFAICT undesirable.

```
 $ nix-instantiate --strict --eval --expr '{ x = a: a; }'
{ x = <LAMBDA>; }

 $ nix-instantiate --strict --eval --expr --json '{ x = a: a; }'
error:
       … while evaluating attribute 'x'
         at «string»:1:3:
            1| { x = a: a; }
             |   ^

       error: cannot convert a function to JSON
       at «string»:1:3:
            1| { x = a: a; }
             |   ^
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: policy discussion Discuss policies to work in and around Nixpkgs 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants