NixOS Installation Guide: Difference between revisions

From NixOS Wiki
imported>Mic92
No edit summary
imported>Volth
Line 54: Line 54:
* Blog post how to install NixOS on a [http://grahamc.com/blog/nixos-on-dell-9560 Dell 9560]
* Blog post how to install NixOS on a [http://grahamc.com/blog/nixos-on-dell-9560 Dell 9560]
* for embedded Hardware like the Raspberry Pi2 see [[NixOS on ARM]]
* for embedded Hardware like the Raspberry Pi2 see [[NixOS on ARM]]
* Brand servers may require extra kernel modules be included into initrd (boot.initrd.extraKernelModules in configuration.nix) For example HP Proliant needs "hpsa" module to see the disk drive.

Revision as of 22:18, 22 August 2017

For commodity PC hardware the official manual should covers the most use cases.

Build a custom installation image

NixOS provides an easy way to build a custom variant of the installation image. This might be useful to embed your own ssh key or enable additional features like zfs support. It allows to specify a custom configuration.nix which is used to build the image This is explained in Creating a NixOS live CD.

Install Nixos on VPS/Cloud-Provider

Not all providers allow to upload own images or provide NixOS images for installation. However there are a few ways to install NixOS anyhow.

nixos-in-place and 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 repo

Installation Stories

Add the code you needed to run in order to deploy NixOS at $provider .

Hetzner

Hetzner provides an 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 NixOps

Digitalocean

On Digitalocean the project nixos-infect can be used to transform an existing installation into NixOS. This method will be also used in NixOps.

Netcup

You can mount your own images similar to hetzner, see the official netcup documentation.

Linode

NixOS is official supported by Linode. Up to date documentation can be obtained from their manual

CloudAtCost

Scaleway

The kexec 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 /dev/nbdX drives which works only with Scaleway supplied images.

Rackspace

See Install NixOS on Rackspace Cloud Servers.

Online.net

See Install NixOS on Online.Net.

<your vps provider here>

Special hardware

  • Blog post how to install NixOS on a Dell 9560
  • for embedded Hardware like the Raspberry Pi2 see NixOS on ARM
  • Brand servers may require extra kernel modules be included into initrd (boot.initrd.extraKernelModules in configuration.nix) For example HP Proliant needs "hpsa" module to see the disk drive.