This text assumes minimal familiarity with Nix. If you ever wrote or adjusted a Nix configuration, that’s probably more than enough to get it.
TL;DR; We will rebuild the derivation {...} -> .drv -> $out CLI workflow with Snix in Rust to understand its implementation and to have a base for further experiments.
Nix can feel like magic the first time it runs — you write a bit of functional code, execute a command, and suddenly a reproducible package appears in /nix/store. This post pries open the hood.
A home server is way more than a server at home. It is a place to experiment, a
low-stakes playground for ideas and a great way to make the life of you and your
roommates better and worse at the same time. Since my
budget envelope for a new home server has been
spilling over for some time, I set out to replace current one.
I’ve had an
Intel Celeron J4105-based server
for the last five or six years. Its motherboard provides four SATA ports which
were hooked up to a few older spinning rust hard disks. Since energy is
expensive here in Germany (currently around €0.30 per kWh), those were
configured to spin down after 30 minutes of idle. This also reduced the noise
level of the server to practically zero when it was idling. However, spinning
the disks up takes 10–15 seconds and makes the first use of basically any
service feel sluggish. Additionally, although the motherboard consumes almost no
power (around 5 Watts), it also feels pretty slow when you’re used to, for
example, a modern laptop. It runs FreeNAS, now
TrueNAS, which has excellent ZFS
support and also supports plugins, similar to other commercial NAS providers.
If you find yourself sitting in front of your computer, more or less eager to start writing your Bachelor, Master or
PhD thesis and just want a nice, slightly over-engineered template to start: don’t look any further.
Here’s a cliché of a sport cyclist: expensive gear, team clothes in matching
colors, an overly competitive attitude and last but not least shaved legs. Of
course it is not true for all cyclists. But go to a professional or even
amateur race and you will find these people – and that’s fine. The cliché
stopped me from any group events on a bicycle, though. It’s not that I don’t
have respect for competitive cyclists and their achievements but I’m
certainly not one of them.