Skip to content
The Log

NixOS is all config

nixos-is-all-config.png

Everybody thinks in apt install. You SSH in, something's missing, you install it, tweak a config file, restart the service and move on; it works, and that's why everybody does it. Sooner or later the server is a pile of those quick fixes, and nobody, including whoever made them, can say which ones still matter.

We went through pretty much every step of that ourselves getting strackt to configure servers. First plain SSH: terminal commands run in order, until the order or the state of the server drifted. Then a script we installed on the server and ran there, which was more consistent but still landed on top of whatever was already on the box. Then Ansible, for quite a long time; a huge improvement over both, but every run lays its changes on top of the last one, and in testing that catches up with you quickly. Why I take my time has the longer version.

NixOS was the next step, and the one that took longest. We read up on Nix for a long time before switching; it's an interesting proposition, but it's pretty complicated and a big break from how every other distribution works. On NixOS the whole server is one configuration. There's no quick fix living outside of it; the server is what the config says, and nothing else.

It isn't Ubuntu

That's also what makes it strange to log in to. You can SSH into a strackt server and use sudo, but most of what you know from Ubuntu or Debian lives somewhere else. /etc is largely generated, a lot of the system is read-only, and the change you just made by hand gets overwritten by the next deploy. The habits that work everywhere else don't stick here... and that's the point. Quick solutions work on Ubuntu and leave you with random config; NixOS is all config.

Detach gives you NixOS back

That matters most on the day someone leaves. Detach hands you the running server, and what you get back is NixOS: the whole configuration sits in /etc/nixos, and you change it by rebuilding with nixos-rebuild switch, not by patching with apt. It's a real exit; it just doesn't lead to Ubuntu, and the basics work quite differently from what most people know from Ubuntu or Debian.

So we don't hand it over bare. Every detached server comes with a handover guide written for that server: how to connect, where each application lives, how to rebuild, where the secrets are and how to remove our access. We mail it to you and keep it in the app. The login banner changes too. "Managed by strackt" becomes the date the server became yours, the config path and the exact rebuild command, plus where to look when a service fails. It doesn't make Nix simple; it makes the first day on your own a lot less of a guess.

We'd rather hand you a server that's all config than one that's all quick fixes. It's a bit strange to log in to... but it's one you can read from top to bottom once it's yours.