nixos/documentation: Allow specifying extraSources#81557
Merged
infinisil merged 1 commit intoNixOS:masterfrom Mar 21, 2020
Merged
nixos/documentation: Allow specifying extraSources#81557infinisil merged 1 commit intoNixOS:masterfrom
infinisil merged 1 commit intoNixOS:masterfrom
Conversation
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nixos-20-03-feature-freeze/5655/39 |
infinisil
requested changes
Mar 19, 2020
Member
infinisil
left a comment
There was a problem hiding this comment.
Other than my comment, this looks good to me!
Because there was absolutely no way of setting this without rewriting parts of the module otherwise.
7535c42 to
34dd64b
Compare
Contributor
Author
|
Resolved. |
infinisil
approved these changes
Mar 21, 2020
Contributor
Author
|
Would it still be possible to land this on |
Member
|
Backported to 20.03 in 6df8f27 :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because there was absolutely no way of setting this without rewriting parts of the module otherwise.
Motivation for this change
When using https://github.com/DBCDK/morph with NixOS machines specifying
documentation.nixos.includeAllModules = true;, the manuals of NixOS instantations were impure & repeatedly rebuilding due to both morph's use of temporary directories & Nixpkgs modules and the normal location of the morph network's repository being in a user's home directory along with our definition of Nixpkgs modules. Some examples from these manual builds:NixOS's documentation machinery has a configuration option to deal with this,
extraSources, but it's not exposed, and the expressions aren't structured in a way to allow sneaky, underhanded configuration either. You can't get around this without patching Nixpkgs. (This PR has been tested so far on our repository via applyingpkgs.applyPatches { src = nixpkgs.outPath; patches = [ ./nixpkgs-nixos-expose-extrasources.patch ]; }before importing Nixpkgs. (Whee.))With this change in place, the repository-directory impurity demonstrated can be eliminated with
nixos.extraSources = [ ./. ];from the repository root, and the morph impurity with an (approximate) patch to/data/eval-machines.nixof:Sorry for the delay on PRing this; I know this should have been in way earlier for 20.03's sake. If possible, I'd like to get this backported to 20.03 for sanity in situtations like morph when
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)This change is