Containerised Mastodon server on NixOS

I’ve been on the fediverse on and off since started to be a thing. I remember hosting an instance at that suddenly got popular and the server melted away while I was apologising to the users. I can see someone bought the domain to host some psychedelic My Little Pony stuff, I’m all for that. I moved to when it got started and was quite happy there - check it out if you’re looking for an instance ! [Read More]

How to use a non-default ssh port for a Nix distributed build host

I wanted to host my ssh server on a different port than the default 22, this allows me to skip on some spam in the logs, as the default port gets scanned quite often. By changing that on the server I broke distributing my nix builds, as they were using the default port as well. It took me a while to figure out how to configure the port the builder would use so I thought I would share here. [Read More]

legdur - keep your legacy durable

Hey, I wrote a thing. Thing being a piece of software. I have a collection of photos & documents that I really care about. I synch them between computers using syncthing and also run backups regularly. What I didn’t have was a way to quickly detect bitrot. Enter legdur legdur is a simple CLI program to compute hashes of large sets of files in large directory structures and compare them with a previous snapshot. [Read More]
cli  rust 

Quick reproducible zig dev env using nix flakes

Want this great feeling of entering a directory and having all your dev setup done but can never remember how to set up nix flakes ? What you’ll need is, in addition to a working direnv with nix and nix flake enabled, is: .envrc: use flake .gitignore: .direnv/ flake.nix (this nixpkgs hash points to the first revision with zig 0.9 present): { inputs = { nixpkgs = { type = "github"; owner = "nixos"; repo = "nixpkgs"; ref = "e1eeb53e64159fbb2610ba7810ed511e4d5c10ca"; }; flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; }; outputs = { self, nixpkgs, flake-compat }: let pkgs = nixpkgs. [Read More]
zig  nix 

Using own OpenWRT router with Vodafone/Cityfibre

For something very different this time, a quick recipe for a very specific situation. One of the very few fiber-to-the-home solutions in the UK is through Cityfibre, sold as Vodafone “Gigafast” packages where I live. As with other ISPs they give you their own internet router. If you would like to use your own, here’s how. TLDR; Obtain PPPoE credentials specific to your account from Vodafone, then use them to configure your router, you need to tag all your packets with VLAN 911. [Read More]

My 2020 setup

Hello and welcome to the second edition of me doing a summary of the year of using tech tools. Here’s a list of software and some hardware I find useful, either things that I use daily or things that make an unusual task pleasant instead of incredibly difficult. This is constantly evolving, so please mind the publish date of this post, please also check the last year’s installment as this article will make references to the previous setup. [Read More]

Don't let failures spread over your suite with process-based tests isolation

Being able to precisely control what failures in underlying systems occur and at what time can be really useful in achieving a fast and stable test suite. While I am a big proponent of dependency inversion and being able to control dependencies via the explicit injection points in your API, sometimes it’s impractical to do so. This is where fail can help us immensely, providing an escape hatch for situations like those as it allows to inject failures into previously defined failure points. [Read More]