-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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: minor fixes #79736
nixos-container: minor fixes #79736
Conversation
7d51c49
to
31bbcc2
Compare
Resolved the merge conflicts that were caused by the introduction of initial flake support. @GrahamcOfBorg test containers-imperative |
Maybe it is possible to leave configuration file, so inspection of a problem is easier? |
Good idea 👍 . However I wouldn't keep the full data directory. We could either print the configs to stderr (which might be harmful though if the config is rather long) or move it to a temporary file and print the path to it in the error message if the initial setup fails. Regarding your issue: in case you haven't found it yourself, |
@danbst IMHO this should be backported as well. Are there any reasons against this and if not, do you intend to do this or should I take care of this? :) |
@Ma27 yeah, no objections, please you do |
Motivation for this change
While there are plans to rework the nixos-container infrastructure (#69414) in the long-term, the imperative
nixos-container
tool is pretty helpful to e.g. test new modules in an isolated environment.This PR fixes two issues that bothered me for quite some time:
3909f50990ef2a33828c2b43b89846f718d72ea2 - to avoid inconsistent state in case of a failing eval during
nixos-container create
, the entire state/config is removed in that case (until now you'd still have the/etc/containers/<name>.conf
, but no running instance which breaks recreation-attempts).7d51c490b58977f725710d839c8f0aefa39947ba - add
--nixos-path
tonixos-container update
as well. Helpful when hacking e.g. on new modules in a local checkout.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)