After 5 years on Debian, I switched to NixOS at the end of last year. In this blog post I’ll confess to neglecting my server, reflect on why I didn’t get Nix when I looked at it a couple years ago and plug the services I’ve been running for the past years, that I’ve now nixified.
I taught myself programming, I then studied computer science and now for almost 1.5 years I have been working in a small team at a big company. At work we have a team for operations. Over the years I have very much grown as a developer but I have not been much of an operator. I have just been chucking service after service on my VPS by manually editing files via SSH (mostly Nginx configs, systemd units and crontab files). I also never figured out deployment. I love Git, so I set up a post-receive Git hook on the server to restart the systemd service but this was never a solid solution. I only ever touched my server to add another service and over time I lost track of what I was even running.
While I was studying I came across a fellow student who was using NixOS. I looked at it and didn’t get it. I didn’t want a layer of abstraction between me and the actual config files and thought that there were too many software options for one project to be able to provide a single interface to them. What I’ve learned is that I don’t care about the actual config files. What I do care about is tracking everything needed to spin up a server in Git because – I’ll say it again – I love Git. And NixOS let’s me do that! It’s worth noting that Nix makes it easy to look at the actual files and the reproducibility helps with debugging. When it comes to there being too many software options NixOS has escape hatches such as extraConfig options.
Of course Nix(OS) also has some downsides: the error messages aren’t
great, the documentation could be better, if you look too close at
different NixOS modules you find inconsistencies and I’m really missing
a language server that’s as good as the ones for other programming
languages. There’s nil and
there’s nixd. For
autocompletion I’ve found nixd more useful and I just made a minor
contribution to enable autocompletion in config
sections but there’s much more work to be done and I’d prefer to do such
work in Rust rather than C++. Despite me already having several
ambitious projects planned I might spend some time working on some Nix
LSP implementation because there’s already a community interested in it
and I really enjoy working together with other developers.
Despite these shortcomings NixOS has solved software deployment for
me. In the repository of the software I define a
default.nix
file for a Nix package and a
service.nix
file for a NixOS module that I then import in
my NixOS configuration via npins (because I chose not to
use flakes). Nixifying all my services has been very satisfying. My config is public so you can
check it out. Now that I know for sure what I’m running I can seize the
chance to tell you what websites I have been running for the past 3-4
years:
spec.pub: redirects to specifications, e.g. spec.pub/lsp for the language server protocol
lex.surf: back when I was studying I used at.lex.surf/ug as a shortcut to the Universitätsgesetz (university law of Austria) … while there’s a subdomain for every country law fetchers are currently only implemented for Austria, Germany and the UK. I’ve now finally automated these fetchers to run every day.
rust-features.push-f.com: alternative to caniuse.rs (built from the same TOML files) with a better search that works without WASM and the website even displays content if you don’t have JS. Generated from the caniuse.rs repo every hour.
osm-proposals.push-f.com: In 2022 I contributed quite a bit to the OpenStreetMap wiki, I am still generating an overview table for the tagging proposals from the wiki every hour.
geopos.link: When meeting with others somewhere (usually for beach volleyball) I don’t like sharing a Google Maps link because I don’t like promoting tech giants. I would share a geo: URI however popular messaging apps like Signal, WhatsApp and Telegram don’t recognize such links, so I built a small web app to share geographic positions. The coordinates are encoded in the URI fragment which is never sent to the server.
The source code for all of these can be found under git.push-f.com. I’m promoting these websites here because I have never actively promoted them anywhere. All these years I have mostly been doing stuff and not really been communicating what I’ve been doing and I want to change that. I want to blog more (planned topics are Monitoring and New Tools), there’s an Atom feed and I’m also on Bluesky. In the interest of pursuing more timely communication rather than just retrospection: next week I’m going to a NixOS meetup in Vienna to help with Zero Hydra Failures. I recently got a vinyl cutter and will bring some free self-made Nix stickers (see the post thumbnail), so see you there? Or in the next blog post :)