lib.evalModules: Add extendModules and type to result#143207
lib.evalModules: Add extendModules and type to result#143207roberth merged 7 commits intoNixOS:masterfrom
Conversation
498e5bc to
45ca3b6
Compare
|
Tests pass and hashes are unchanged for |
TODO: - [ ] NixOS/nixpkgs#143207 - [ ] switch to master or nixos-unstable with niv
TODO: - [ ] NixOS/nixpkgs#143207 - [ ] switch to master or nixos-unstable with niv
|
I've dug through the issues and PRs and found no surprises. |
90b7511 to
dc5764a
Compare
|
I'm out of ideas to further validate and test this solution. Please review :) |
There was a problem hiding this comment.
I'm pretty sure this broke cross-compiled specialisations before.
Allows the simultaneous construction of top-level invocations and submodule types. This helps structure configuration systems integration code.
Also works for (pkgs.nixos {}).type.
…serModules" This reverts commit e2bea44. While this commit was probably fine, I want to be conservative with changes right before the release branch-off. So far the extendModules commits have been adding and refactoring expressions that did not affect derivation hashes, whereas this commit changes the module ordering. I will open a separate PR for it.
dc5764a to
0b0d263
Compare
|
Considering that the design is already the result of discussion with @infinisil and I've validated the design in three use cases and I've reduced the potential impact to near zero by reverting the specialisations commit, I will go ahead and merge this in order not to stall progress. Limited existence/availability of maintainers for this very specific code was also a factor of consideration. I'll be happy to receive feedback after the merge and I am available (and capable) to resolve any issues if they do happen to arise. I don't merge my own PRs lightly. |
|
Sounds good! |
Using NixOS/nixpkgs#143207 allows some nice cleanup and fixes #41 This commit here notably requires a version after the above nixpkgs PR, and versions before the above nixpkgs PR don't work with it. While it would be possible to keep it backwards compatible, it doesn't seem worth the trouble.
Motivation for this change
Primary goal: allow configuration systems to be embedded in other configuration systems more easily.
Allows the simultaneous construction of top-level invocations and
submodule types. Any configuration system that previously only exposed
evalConfigcan now also expose a type easily.Allow NixOS specialisations to be expressed cleanly
Side catch:
Example integration of modules into a configuration system (à la NixOS / home manager / arion / etc)
This is the successor of #143133.
Closes #141733
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)