nixos/system: Support pre-activated images#237040
Conversation
There was a problem hiding this comment.
Don't you only need to have perl available on the hostPlatform ?
There was a problem hiding this comment.
@perl@ is substituted in switch-to-configuration.pl.
substituteAll obscures that. Would be nice to be explicit about the variables.
There was a problem hiding this comment.
Apologies, my comment was about whether you needed to guard on same host platform and build platform to run the Perl check and I was wondering as Perl is like just checking a script if it could run beyond that condition.
There was a problem hiding this comment.
I suppose you could bring a separate perl for that purpose, but I doubt that it'd be worth the effort.
|
This has uncovered some previously broken tests, but works with my fixes applied: Don't know how to fix (but not a blocker): |
Allows omission of this functionality through disabledModules, e.g. for image building.
This helps with understanding the code. We might make this not depend on environment variables later. systemBuilderArgs is a form of global state, which isn't helpful.
53c2f97 to
2e234a6
Compare
This way it will be easier to reuse in a different context, such as a separate build of the activation script by itself (TBD).
These variables were previously used by the activation script build commands, but are now embedded into those commands for to improve reusability for an upcoming addition.
2e234a6 to
772d607
Compare
|
I wasn't happy about the lack of validation or test, so I did the thing, not just refactor prep anymore. See last commit. |
|
I am following this PR but my bandwidth is a bit low right now, I will try
to give it a proper review later on.
Le mer. 28 juin 2023 à 14:10, Robert Hensing ***@***.***> a
écrit :
… I wasn't happy about the lack of validation or test, so I did the thing,
not just refactor prep anymore. See last commit.
—
Reply to this email directly, view it on GitHub
<#237040 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACMZRFGC4MIMMMEJMX7AR3XNQNKLANCNFSM6AAAAAAZBWCGJA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
|
👍 No hurry |
RaitoBezarius
left a comment
There was a problem hiding this comment.
Awesome, this looks good to me. (first read)
I will take it for a walk later on actual systems.
|
Thanks! |
Description of changes
Mostly refactoring, except for the last commit which introduces the feature.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)