Table of Contents

NixOS

Nix is and means multiple things – there is:

There are some offical guides to NixOS that you can find on nixos.org, an other source of information is the unoffical user wiki and for a general introduction you can look at zero-to-nix.

NixOS @ c3voc

Our Nix configuration lives at https://forgejo.c3voc.de/voc/cm/src/branch/master/nixos and one three configuration_managment tools in use, scoped for all new data center related systems.

Each NixOS managed host has a set of default options (flake.nix, outputs.colmena.default) and all host specific options, which should be placed under hosts/<hostname>/.

You need to have the nix packet manager installed on your local system.

We use colemena to deploy configs to our nix-based hosts.

Frequent tasks

Deploy a new version of $software on $host

To get a shell with colmena installed run in this directory:

  nix develop

… TBD

Deploy a host

To get a shell with colmena installed run in this directory:

  nix develop

To deploy a specific host simply run

  colmena apply switch --on "<name from host.nix>"

When you are on a non x86_64-linux platform you want to use a nix remote builder.

In case you don't have a remote-builder available you can do --build-on-target to use the target machine as builder.