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 doc: document the installation process from other distros as well as NIXOS_LUSTRATE #36272

Merged
merged 2 commits into from Mar 4, 2018

Conversation

obadz
Copy link
Contributor

@obadz obadz commented Mar 4, 2018

Also when installing from other distros, I've found that nixos-install
doesn't find [ when chrooting so adding full path to it.
No longer the case with the nix-2.0 branch merged

Motivation 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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions (Ubuntu)
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@obadz
Copy link
Contributor Author

obadz commented Mar 4, 2018

Rebased over the nix-2.0 merge.

Not doing so makes it impossible to use nixos-enter from a non-NixOS
distro
@obadz
Copy link
Contributor Author

obadz commented Mar 4, 2018

Tested again on Ubuntu with nix-2.0 branch. Added fix to nixos-enter. Also documented how to do dual boot and a few more things.

@obadz obadz merged commit 9dc62dd into NixOS:master Mar 4, 2018
system=/nix/var/nix/profiles/system
command=($system/sw/bin/bash "--login")
Copy link
Contributor Author

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
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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)?

Copy link
Contributor Author

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.

obadz added a commit that referenced this pull request Mar 7, 2018
vcunat pushed a commit that referenced this pull request Mar 7, 2018
@obadz obadz deleted the nixos-lustrate-doc branch December 24, 2018 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants