Configure a systemd Service to Perform Side Effects and Corresponding Cleanup

Problem and Motivation For a Linux-based demo setup, I need certain side effects and corresponding cleanup steps every time the system boots or relevant system configuration changes. I’m using NixOS, and systemd is the easiest and most powerful way to manage setup tasks at system startup or on substantial system configuration changes in NixOS. I didn’t need a daemon running in the background (which is the major purpose for systemd services), but specifically Read more…

Migrate Default NixOS Configuration to Flake

Although Nix flakes are still marked as unstable, they became the de facto standard for managing reproducible NixOS system configurations. Regarding NixOS system configurations, the major benefit of flakes is that they bundle nixpkgs (and possibly further dependencies) along with the configuration files. The nixpkgs version and the configuration files are no longer separate as they used to be! This is a major benefit and enables you to properly manage your NixOS system Read more…

Screenshow: Basic flake.nix for a NixOS System Configuration

Working on Mini Operating Systems for Testing of Virtualization Stacks at Cyberus

Usually, I do not just forward people to other blogs. But the other day, I published an interesting article on my company’s* tech blog about testing virtualization stacks using mini operating systems. Here’s the excerpt: Testing and debugging erroneous behavior by a guest under a virtualization stack is hard and difficult. By leveraging multiple mini operating system kernels, we can investigate issues related to complicated topics, such as never delivered interrupts, with a Read more…

Modern Command Line Tool for FTP Backups

TL;DR: The convenient CLI-based FTP mirroring tool you wished for (hopefully, lol). In my previous blog post, I presented lftp as my CLI tool of choice in 2024 to connect to FTP servers to perform a parallel recursive download with FTPS (FTP over TLS). However, lftp is a powerful low-level building block, and you need to know how to use it to mirror a directory via FTP. I created a small convenient bash Read more…

Output of "--help" of my "ftp-backup" shell wrapper for "lftp" (screenshot).
Code snippet: Command line tool lftp for a parallel recursive secure FTP download of a remote directory.

Parallel Recursive FTPS Mirroring (Directory Download) from Command Line

TL;DR In this blog post, I show you the best option I found that you can use in 2024 to perform a parallel recursive download (backup) of an FTP directory via FTPS (explicit FTP via TLS) from the command line. lftp is the best command line tool (for Linux, macOS and other UNIX-like systems), but needs to be properly configured. For GUI-focused users, I recommend FileZilla. Introduction FTP is a quite outdated protocol Read more…

Compile Linux out-of-tree Module on NixOS in a Nix shell with an FHS Environment

In an earlier post, I talked about how you can build an out-of-tree Linux kernel module in a Nix derivation, i.e., package it in Nix. However, for quick prototyping, sometimes you want to just enter $ make in your shell, for example to check if everything compiles. Out-of-tree module projects following the recommended guidelines use a Makefile, possibly an additional KBuild file, and of course C source and header files. This header file Read more…