-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
feat: add a recovery shell #274
Conversation
then chroot into your NixOS system, similar to what `nixos-enter` would do | ||
on a normal NixOS install. | ||
|
||
You can choose an older generation to load with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a subcommand to list available generations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really want to make that wrapper any bigger than it needs to be, but maybe we should document that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like something that should be handled in the distro-launcher. NixOS rescue could give a selection of the available generations and then run the appropriate command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we have it, yes, though I'd like to also have the fallback for people that install from their own tarballs.
@@ -8,6 +8,16 @@ let | |||
exec ${pkgs.bashInteractive}/bin/sh "$@" | |||
''; | |||
|
|||
nixos-enter' = config.system.build.nixos-enter.overrideAttrs (_: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we already have the fix for NixOS/nix#7602 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be in the next 2.13 release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the systemd-container branch, I put all well-known binaries into /nix/nixos-wsl
. That might be a good idea for this as well (It doesn't have to be that exact path, I can still change that, it should just be the same one for everything like this)
I don't think we should have things in |
Good point. How about |
I'm not sure we want to be touching /usr either... Not really sure what a good place for this is. |
So I just figured something out - we can't actually put this in the toplevel, because the toplevel is an absolute symlink, so it ends up pointing to the wrong place on the system distro. |
Also, I've changed the shebang and added an explicit error message to detect when the recovery shell is running from inside NixOS, so we can abort. |
Unfortunate... It might be worth revisiting when adding a recovery command to the launcher, but for now I'll merge this as-is |
No description provided.