Matthias Totschnig's blog

Hello, RISC-V and QEMU

To experiment with RISC-V assembly, I've been trying to run and debug RISC-V binaries using QEMU.

Early boot remote decryption on NixOS

To remotely reboot a system with an encrypted root file system, one can provide the encryption keys via SSH during early boot. To that end, networking utilities and an SSH server need to be installed in the initial ramdisk.

Booting Void Linux using the EFI boot stub

When the kernel is compiled with the EFI boot stub like the one packaged in Void, UEFI firmware can load the kernel directly as an EFI executable, eliminating the need for a bootloader.

WireGuard network namespace on NixOS

We configure a network namespace (as described in the WireGuard documentation) containing solely a WireGuard interface whereto systemd services can be confined.

Don't serialize default values

By default, serde includes all fields when serializing a struct, even when their value is the default. This can lead to noisy output containing empty values.

Plain applications

Store data in flat text files

The UNIX Philosophy, Mike Gancarz

We extend this idea by introducing the concept of plain applications, presenting their advantages and illustrating it with examples.

Remove link outlines while preserving accessibility

While you may want to get rid of the outlines showing up when clicking on links, it's important not to completely remove focus styles. (outlinenone.com advocates against such behavior)

Fortunately, we can preserve outline styles when tabbing, but remove them when clicking, using only CSS.

Ordinal date suffixes with hugo

To format a date with an ordinal suffix (like '1st' or '2nd') with Hugo, the trick is to format the day separately, and use the humanize function to add a suffix to the number.