-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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-rebuild: use nix build
and nix copy
#45919
Conversation
While I agree we should eventually do this, I don't think we should do it just yet.
|
In |
What about gating it behind a flag or an env var? That way it's opt in, but people can start experimenting with it bug upstream if it's not usable enough. |
a06fe23
to
2033fbf
Compare
I looked into gating it behind an env var, but it's awkward because the valid arguments are different for I also noticed that this is a behaviour change: because it's passing |
Yes, the different options are a pain. I recommend we heed the "EXPERIMENTAL" warning and keep things as they are for now. Eventually, |
I agree with @xeji, it seems to be too early to make that switch. |
Any chance this could be packaged as an optional replacement? Either a separate package with a different command name, or a NixOS module option like |
Yes, that's a nice idea, I hadn't thought of that. I'll look into it. I think a separate package makes sense - then you just install |
This won't work well as a separately packaged script, since it builds I guess there's nothing really that can be done here unless there are some changes to the nix UI. |
Motivation for this change
Get the nice progress indicators when running
nixos-rebuild
. Mostly fixes #45595.Things done
nix-copy-closure
withnix copy
.nix-build
withnix build
.I haven't attempted to touch any of the uses of
nix-instantiate
, since as I understand it there isn't a good Nix 2.0 replacement for the stuff that's being done there.This is obviously going to need pretty careful testing, but I'm putting this up to get things going. I've tested it on my own machine and it seems to work nicely!
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)