Skip to content
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-enter cannot be used reliably #224830

Closed
RaitoBezarius opened this issue Apr 5, 2023 · 1 comment
Closed

nixos-enter cannot be used reliably #224830

RaitoBezarius opened this issue Apr 5, 2023 · 1 comment
Labels
0.kind: bug Something is broken

Comments

@RaitoBezarius
Copy link
Member

Describe the bug

nixos-enter is an important tool to repair / debug NixOS systems externally.

Alas, since Nix 2.11 (and probably before for other reasons on other things), it is not reliable and cannot be used without extensive Nix knowledge to workaround its quirks.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nixos-enter --root /mnt
  2. Run any nix-related commands
  3. Experiment an "in-chroot" but "unpivoted from /mnt" situation

Expected behavior

nix should work as expected at least, I am not talking about systemd-related stuff.

Notify maintainers

nixos-install-tools has no maintainers.

see NixOS/nix#7602

@VincentVanlaer
Copy link
Contributor

For context, while the bug in my opinion is not caused by nixos-enter, there is a way to modify nixos-enter that works around the issue. The patch for that can be found in NixOS/nix#7602 . I'm happy to make a PR with that patch if desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants
@RaitoBezarius @VincentVanlaer and others