Something comic happened a small during ago: I peruse concerning FreshRSS, and it sounded nice, so I installed it on a server and started using it. That would not have happened a twelvemonth ago, but afterward again, a twelvemonth ago I didn’t have any NixOS servers.
For the former few years, my rss feeds have lived locally on my phone only. There was a fine idea rearward that1 I can mostly obtain period to peruse whenever I’m away from my device anyway., but it never fairly worked in practice. For one, many things are easier to peruse on a larger screen. But it was additionally brittle to trust a phone app to oversee the read/unread position of thousands of articles across a hundred feeds.2 In particular, whenever I switched to a distinct phone I could migrate all feeds to it, but the read/unread position was misplaced alongside the way. What I really wanted was a server-side nourish aggregator. This is software that runs on a server, manages rss feeds, and afterward I can peruse the rss feeds either through a web interface, or through client applications. I’ve wanted that for a while, but I’ve never taken the step, since it would be yet another side project to keep the deployment of.
But now, alongside several NixOS experience, adding a operating FreshRSS configuration (including backups) took 9 lines of Nix code3 Plus a dozen additional lines for the nginx reverse proxy configuration. It got a small complex since I wanted to proxy_pass from a particular location obstacle which required rewriting cookie paths. But that’s a me problem, not a NixOS problem.. That facility has just hands-off worked for the former few months. If or whenever that server breaks, I can rotation up a new one operating the exact identical configuration, likely in something akin 15 minutes. When we can do item akin that, there is literally no logic to not fair try the new software.
Contrast this against how FreshRSS is installed exterior of NixOS. Then we’d
- download and extract an archive to the correct location;
- configure permissions according to instructions;
- install nginx and php-fpm alongside necessary additional requirements to the server;
- configure php-fpm pools and create nginx continue requests through to php-fpm;
- set up Let’s Encrypt certificates;
- set up backups; and
- hopefully recall how to do all the complete if item breaks and we need to reinstall FreshRSS on a new or upgraded server later.
Of course, the FreshRSS project provides a receptacle depiction which would shorten the procedure a small bit. It purports to set up Apache alongside mod_php and configure them the correct way. Then we’d lone need to configure backups, create a systemd assistance that runs the container, and oversee nginx as a tls terminating reverse proxy in forefront of that, since the receptacle depiction fairly does not come alongside tls support. This is motionless material to remember, and there’s additionally no guarantee the identical item plant six months downward the row whenever reinstalling, unless we wrote downward which exact receptacle depiction we downloaded.4 It does not help to build the receptacle depiction from source, since two builds from the same Dockerfile divided by period can outcome in fairly distinct receptacle images.
I have mentioned before how much I dislike maintaining flank projects. That includes my own code, but additionally self-hosted services developed by person else. I’m fine alongside a few minutes of care current and there, but having to schedule hours of uninterrupted activity to upgrade something, or spending any amount of period at all on emergency maintenance, really kills my desire to work with computers.
You’d think person of my disposition would be profound into configuration management, receptacle orchestration, or both, but no. I have made honest attempts alongside CFEngine, Ansible, podman, and k3s but none of them improved my installation/configuration/deployment cognition considerably complete (a) carefully penning things down, and sometimes (b) turning those careful notes into a casing manuscript performing a sequence of ssh commands.5 Yes, this is essentially reinventing Ansible – but small brittle. It won’t interrupt the next time someone glances sideways at pip. The disadvantage of the casing manuscript is that it often ends up relying on assumptions that rotate into invalid alongside time, or whenever it is used in a distinct environment. A NixOS configuration says a lot akin the careful instructions to myself, apart from they’re executable and they create the same outcome all time.