-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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 copySystemConfiguration: enable by default #16922
nixos copySystemConfiguration: enable by default #16922
Conversation
@ryantrinkle, thanks for your PR! By analyzing the annotation information on this pull request, we identified @edolstra, @lethalman and @shlevy to be potential reviewers |
Your PR message contains useful information about why we should have this. IMHO, that belongs in the commit message as well. (Btw, if the commit started out with that message, github would automatically copy it to the PR message when you open the PR.) How does it work for users with modularized configuration.nix? Does only the configuration.nix file itself get copied, or also all referenced files? |
Indeed we cannot enable this option by default because |
Looks to me like this could be closed? |
As noted in the option's description, it's simple and only copies that single file, so the general usability seems rather limited to me. |
Hi everyone, and thanks for the input. With your explanations, it certainly makes sense why it's not enabled by default. However, I still wonder if there is a way we can help beginners with this, since they're they ones most likely to need it and least likely to know about it. Just today, there was a post on the mailing list where someone didn't know about this option until it was too late. @edolstra Perhaps it would make sense to change |
I was the one that accidentally deleted my While I do see why it is set to [1]: which can probably be solved with #709 on Nix: deterministic evaluation of expressions/derivations which will make it possible to determine what files |
[1] would be like using a sledgehammer to crack a nut. |
@vcunat fair enough, but it's probably useful for other situations as well. |
Motivation for this change
system.copySystemConfiguration copies /etc/nixos/configuration.nix into the system derivation at build time. This can be very useful for debugging, but is much more useful if it was enabled before problems were encountered; however, users are not likely to realize they need this feature until it is too late.
Previously, this feature was not enabled by default because it did not work with chroots (see #7974). That issue was fixed in e1901a1.