Creating a base OCI image for Nix flake builds within Gitea/Forgejo

I’ve been moving more and more of my infrastructure to be self-hosted recently. Part of that involves setting up CI jobs for testing and publishing artifacts, mostly rust crates but also this very blog. I really wanted to re-use my existing Nix flakes for those projects, this way I know my local dev env would be the same env then used on CI. I am self-hosting a Gitea instance (will probably be migrating to Forgejo) and it uses a CI system built to resemble Github actions - basically you run your jobs as containers and within those you can run arbitrary commands. [Read More]
nix  nixos  ci  docker  oci 

This blog is now self-hosted !

This is just a quick info that this blog is now self-hosted by yours truly. I’m using a small server at Mythic Beasts. I have a small CI situation going on via (self-hosted) Gitea Actions, it rsyncs the contents to the server. Good old nginx + rsync and that’s it. I took this as an opportunity to hook up htmltest and it highlighted that a lot of places I linked to no longer exist or have moved. [Read More]

Containerised Mastodon server on NixOS

If you're here to learn about how to set up a Mastodon server on NixOS the easy way - you can use services.mastodon.enable = true; and take it from there ! This post does describe a bit more convoluted setup than that. I’ve been on the fediverse on and off since friendi.ca started to be a thing. I remember hosting an instance at ponk.pink that suddenly got popular and the server melted away while I was apologising to the users. [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]
nix 

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]