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 should use nix.* options when building nixpkgs #8160
Comments
nix.*
options when building nixpkgs
Yes I agree. Basically nixos-rebuild should first only update nix.conf Even better of course would be providing the new config via an environment On Thu, Jun 4, 2015, 12:16 AM Carter Charbonneau notifications@github.com
|
Nixos-rebuild certainly first builds new nix and then uses the result to evaluate the system (by default). That's fine. However, consider that For |
Thinking about it, it would probably be best to create a temporary profile On Fri, Jun 5, 2015, 1:09 PM Vladimír Čunát notifications@github.com
|
The nix config gets generated as a part of the nixos build, so it needs to get into store anyway in the end. |
A related thing that I got burned by today; specifically entering invalid stuff into
After this all/most nix commands stopped working, including |
This is still a problem. It's a minor problem but still annoying. In fact, it is two problems:
For 1, there needs to be a lint mode on nix. @edolstra would that be hard? For 2, the workaround is to first build and use the nix config. Maybe nixos-rebuild could have a --nix-only switch? @vcunat would that be hard do you think? |
For 1, the config should be set by That work-around would have to be more complicated. IIRC our nix (daemon) reads config from |
I have the problem (2) right now: |
you can also |
Actually, would it be possible to map the nix.* options to equivalent build
cli options, and have a --no-map-nix-options flag for when that is not
desired?
…On Wed, Jun 14, 2017 at 6:22 PM Michael Bishop ***@***.***> wrote:
you can also nixos-rebuild --option build-cores 12 to temporarily
override any option at runtime
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8160 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADWlhY3jojaWrt-Q0iaCscT4qW8ihEjks5sEAipgaJpZM4E3MWz>
.
|
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
the config is now validated nixpkgs/nixos/modules/services/misc/nix-daemon.nix Lines 67 to 77 in bfb6f70
|
Great! Not sure what to do about problem 2) though. |
in a flake only the config can be built like this so we can use that in addition to https://nixos.org/manual/nix/stable/command-ref/env-common.html?highlight=NIX_CONFIG#common-environment-variables to do
|
Still relevant. Also affects "cross"-compilation via binfmt emulation (due to this line) in situations where |
Currently,
nixos-rebuild
puts them into/etc/nix/nix.conf
for nix's next invocation. For most of the options, this is fine (if sub-optimal), but for the chroot options (buildUseChroot
andchrootDirs
) these options make another build of nixpkgs necessary (using--option
fornixos-rebuild
should work, but it didn't). This recently bit me in #2387.The text was updated successfully, but these errors were encountered: