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 doc: document the installation process from other distros as well as NIXOS_LUSTRATE #36272
Conversation
1ce5519
to
1720d33
Compare
Rebased over the |
1720d33
to
09e2b07
Compare
…ll as NIXOS_LUSTRATE
Not doing so makes it impossible to use nixos-enter from a non-NixOS distro
09e2b07
to
80ea345
Compare
Tested again on Ubuntu with |
system=/nix/var/nix/profiles/system | ||
command=($system/sw/bin/bash "--login") |
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.
@edolstra — just FYI, I've added added full paths to bash
in nixos-enter
root partition to <literal>/old-root</literal>. This will move | ||
your existing distribution out of the way in the very early | ||
stages of the NixOS bootup. There are exceptions (we do need to | ||
keep NixOS there after all), so the NixOS lustrate process will |
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.
AFAICT the manual doesn't say what "lustrate" means, and it's not a perfectly cromulent word down our way.
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.
Addressed in ee9a785
|
||
<listitem> | ||
<para>It's also worth noting that this whole process can be | ||
automated. This is especially useful for Cloud VMs, where |
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.
If it can be automated, then isn't it better to do that, rather than document how people can do it manually (and probably make mistakes)?
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.
So this is kind of like the fact that we can easily deploy a cloud-based NixOS VM with a one-liner, but installing a desktop takes a few more steps. Similarly, a script that wipes out your existing distro and replace it by NixOS on a desktop is probably not that useful.
That's not to say there aren't a few steps that could be fused into a script but I think the majority of the steps need to be exposed individually.
Also when installing from other distros, I've found thatNo longer the case with thenixos-install
doesn't find
[
when chrooting so adding full path to it.nix-2.0
branch mergedMotivation for this change
The
NIXOS_LUSTRATE
feature has been undocumented since it was committed in #17784 (the only documentation was really in the git commit message and github PR).Installing from a NixOS device is the default but it's also possible to install from other distros (since Nix works on just about any distro), so I've also documented the steps to do that.
Both ways of installing successfully tested on Ubuntu VMs.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)