toraritte.github.io

Minimum NixOS configuration for NixOps deployments

  1. Minimal NixOS config for Nixops deployment (discourse)

  2. Can’t deploy to NixOS #1192 (see hypothes.is annotations as well, under orphans for some reason)1

The NixOps 1.8 User’s Guide (linked from the NixOps repo) has very little info, the 1.7 one is way more detailed, but they both lack some basic information.2

From link 1:

In a standard image you need to activate ssh and add key for root. That is the minimum for nixops to work, since it needs to root access via ssh.

users.users.root.openssh.authorizedKeys.keys = [ <yourkey> ];
services.openssh.enable = true;

See more at NixOS images on Azure discourse thread. (It’s archived, just in case.)

NOTE/TODO: nixops also creates images for various environments, so look at the image declarations, az they probably hold the bare minimum if nothing is added.


So many questions:


[1] The problem is state. This hypothes.is article explains orphans, and it seems that when I made the annotation, I was logged in to github, so the checksum of the HTML elements in the highlighted text (or whatever they use to anchor) differs when opened in a browser where I’m not logged in.

[2] How to start contributing to the NixOps repo? There’s this discourse thread but it barely scratches the surface. Source is king, I guess.