-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos-container: allow custom nixpkgs path. #73458
base: master
Are you sure you want to change the base?
Conversation
or die "$0: failed to build initial container configuration\n"; | ||
if (defined $nixpkgsPath) { | ||
system("nix-env", "-p", "$profileDir/system", | ||
"-I", "nixos-config=$nixosConfigFile", "-I", "nixpkgs=$nixpkgsPath", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems unfortunate to duplicate this block only to add one option. Can you try deduplicating it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered this, but I'm not very familiar with Perl. Does it allow putting a function's arguments into an array and then passing that? Similar to Python's f(*args).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, got this done as an args array.
nixpkgs-path seems unnecessary specific. If you want to support this, then I am of the opinion it should listen to |
Generalizing this and nixos-path into passing arbitrary -I paths is a nice idea, but it would break compatibility. Do we want that? |
b5ce8b0
to
92b16d2
Compare
This commit adds --nixpkgs-path option to create and update operations, allowing the use of custom nixpkgs repos.
92b16d2
to
2eb2da5
Compare
Thank you for your contributions.
|
I marked this as stale due to inactivity. → More info |
This commit adds --nixpkgs-path option to create and update operations, allowing
the use of custom nixpkgs repos.
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @