NixOS Installation Guide: Difference between revisions
imported>Ixxie m Fixed formatting of Hybrid section. |
imported>Ixxie No edit summary |
||
| Line 1: | Line 1: | ||
This guide describes various ways of installing NixOS. The [https://nixos.org/nixos/manual/index.html#ch-installation official manual] should cover most usual use-cases. | This guide describes various ways of installing NixOS. The [https://nixos.org/nixos/manual/index.html#ch-installation official manual] should cover most usual use-cases. | ||
== Installing | == Installing from USB == | ||
Since NixOS 14.11 the installer ISO is hybrid. This means it is bootable on both CD and USB drives. It also boots on EFI systems, like most modern motherboards and Mac* systems. Please read the [[#Hybrid image]] section on how to burn the ISO. | Since NixOS 14.11 the installer ISO is hybrid. This means it is bootable on both CD and USB drives. It also boots on EFI systems, like most modern motherboards and Mac* systems. Please read the [[#Hybrid image]] section on how to burn the ISO. | ||
| Line 178: | Line 178: | ||
This is explained in [[Creating a NixOS live CD]]. | This is explained in [[Creating a NixOS live CD]]. | ||
== | == Installing on VPS & Cloud Providers == | ||
Not all providers allow to upload own images or provide NixOS images for installation. However there are a few ways to install NixOS anyhow. | Not all providers allow to upload own images or provide NixOS images for installation. However there are a few ways to install NixOS anyhow. [https://github.com/jeaye/nixos-in-place nixos-in-place] and [https://github.com/elitak/nixos-infect nixos-infect] are generic approaches to install NixOS from an existing Linux. A different approach is to build an kexec-based image to start the installer from an booted linux as shown in this [https://github.com/cleverca22/nix-tests/tree/master/kexec repo]. Here we list methods known to work on specific providers: | ||
=== Hetzner === | |||
Hetzner provides an [https://wiki.hetzner.de/index.php/LARA/en#Installing_an_OS interface] to upload your own ISO-images. However you may want to build your own iso-image, which has openssh with ssh keys due the lack of a remote console. An easier method to install NixOS on Hetzner, is to use the existing integration into [https://nixos.org/nixops/manual/#idm140737318364240 NixOps] | Hetzner provides an [https://wiki.hetzner.de/index.php/LARA/en#Installing_an_OS interface] to upload your own ISO-images. However you may want to build your own iso-image, which has openssh with ssh keys due the lack of a remote console. An easier method to install NixOS on Hetzner, is to use the existing integration into [https://nixos.org/nixops/manual/#idm140737318364240 NixOps] | ||
=== | === Digital Ocean === | ||
On Digitalocean the project [https://github.com/elitak/nixos-infect nixos-infect] can be used to transform an existing installation into NixOS. This method will be also used in [https://nixos.org/nixops/manual/#sec-deploying-to-digital-ocean NixOps]. | On Digitalocean the project [https://github.com/elitak/nixos-infect nixos-infect] can be used to transform an existing installation into NixOS. This method will be also used in [https://nixos.org/nixops/manual/#sec-deploying-to-digital-ocean NixOps]. | ||
=== Netcup === | |||
You can mount your own images similar to hetzner, see the [https://www.netcup-wiki.de/wiki/Server_Control_Panel_%28SCP%29#Eigene_DVDs official netcup documentation]. | You can mount your own images similar to hetzner, see the [https://www.netcup-wiki.de/wiki/Server_Control_Panel_%28SCP%29#Eigene_DVDs official netcup documentation]. | ||
=== Linode === | |||
NixOS is official supported by Linode. Up to date documentation can be obtained from their [https://www.linode.com/docs/tools-reference/custom-kernels-distros/install-nixos-on-linode manual] | NixOS is official supported by Linode. Up to date documentation can be obtained from their [https://www.linode.com/docs/tools-reference/custom-kernels-distros/install-nixos-on-linode manual] | ||
=== CloudAtCost === | |||
=== Scaleway === | |||
The <code>kexec</code> method above works well, but bear in mind it only works with the 'virtual' class of servers, as they run under a hypervisor which attaches the disks before the kernel boots. The 'bare-metal' servers rely on a special Linux kernel booting to attach network <code>/dev/nbdX</code> drives which works only with Scaleway supplied images. | The <code>kexec</code> method above works well, but bear in mind it only works with the 'virtual' class of servers, as they run under a hypervisor which attaches the disks before the kernel boots. The 'bare-metal' servers rely on a special Linux kernel booting to attach network <code>/dev/nbdX</code> drives which works only with Scaleway supplied images. | ||
=== Rackspace === | |||
See [[Install NixOS on Rackspace Cloud Servers]]. | See [[Install NixOS on Rackspace Cloud Servers]]. | ||
=== Online.net === | |||
See [[Install NixOS on Online.Net]]. | See [[Install NixOS on Online.Net]]. | ||