Nix Setup on macOS: An Overview

A collection of resources for setting up Nix on macOS with nix-darwin and home-manager. The nix-darwin-kickstarter repository is a good starting point for macOS. Run programs without installing them with nix-shell -p cowsay. Remote Deployment: nixos-rebuild announcement Example configurations: jdheyburn/nixos-configs Great examples for: Caddy web server FreshRSS deploy-rs Tailscale integration wimpysworld/nix-config - Production-ready configuration Remote installation with nixos-anywhere: nixos-anywhere uses kexec. If kexec doesn’t work, boot with NixOS ISO instead. Wireless in initrd: Unlocking encrypted drives over WiFi ...

January 14, 2026 · 1 min · 130 words · rustikus

Running Kanata on macOS with LaunchDaemon

Kanata provides more readable keyboard remapping configurations than Karabiner-Elements. To run it automatically on macOS startup, set it up as a LaunchDaemon. Install Kanata via Homebrew: 1 brew install kanata Download and install the Karabiner VirtualHIDDevice driver. Kanata needs this to interact with macOS. Create your Kanata configuration at ~/.config/kanata/config.kbd. See the documentation for examples. Add a key combo to reload your configuration (command: lrld) to avoid manually restarting. Create two .plist files in /Library/LaunchDaemons/ to launch Kanata at startup. ...

January 12, 2026 · 2 min · 266 words · rustikus

Auto-mounting Encrypted External Drive in NixOS

Note: This article is heavily based on The Uncommitted Changes Blog by Pankaj Raghav. All credit goes to the original author. Setting up auto-mounting for a LUKS-encrypted external drive on NixOS requires coordinating LUKS decryption, udev device detection, and systemd mounting. Here’s how to configure it so the drive automatically decrypts and mounts when connected. First, encrypt the drive if you haven’t already: 1 2 3 4 5 6 cryptsetup luksFormat /dev/sda1 ## Enter password cryptsetup open /dev/sda1 vault dd bs=512 count=4 if=/dev/random of=/root/keyfile.key iflag=fullblock cryptsetup luksAddKey /dev/sda1 /root/keyfile.key sudo mkfs.btrfs -L vault /dev/mapper/vault The keyfile allows automatic decryption without typing a password each time. Your device layout will look like: ...

January 11, 2026 · 3 min · 428 words · rustikus

Incorporating EDID into initrd Image on Linux

Some monitors don’t properly report their capabilities (EDID - Extended Display Identification Data) to Linux systems during early boot, causing incorrect resolutions or no video output. You can fix this by incorporating custom EDID data into the initrd image. First, extract the EDID from a working system. Install the required tools: 1 sudo apt install read-edid edid-decode Extract and verify the EDID: 1 2 sudo get-edid > desktop_edid.bin edid-decode desktop_edid.bin Transfer the file to your target system and copy it to the firmware directory: ...

January 9, 2026 · 2 min · 253 words · rustikus

Configuring markdownlint-cli2 in LazyVim

Using shell variables like $HOME in LazyVim’s nvim-lint configuration doesn’t work as expected—the string gets passed literally instead of being expanded. To use a custom markdownlint-cli2 config file with a machine-agnostic path, use Lua’s os.getenv() function: 1 2 3 4 5 6 7 8 9 10 11 12 local HOME = os.getenv("HOME") return { "mfussenegger/nvim-lint", optional = true, opts = { linters = { ["markdownlint-cli2"] = { args = { "--config", HOME .. "/.markdownlint-cli2.yaml", "--" }, }, }, }, } Create your ~/.markdownlint-cli2.yaml configuration file with your preferred rules: ...

January 7, 2026 · 1 min · 98 words · rustikus

Mounting an Encrypted Btrfs System in Arch Linux

To access an encrypted Btrfs Arch Linux system from a live USB, you need to unlock the LUKS partition and mount each Btrfs subvolume before chrooting: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 # Unlock the encrypted partition cryptsetup open /dev/nvme0n1 cryptlvm # Mount the root subvolume mount -o subvol=@ /dev/mapper/cryptlvm /mnt # Mount the home subvolume mount -o subvol=@home /dev/mapper/cryptlvm /mnt/home # Mount the log subvolume with nodatacow option mount -o nodatacow,subvol=@var_log /dev/mapper/cryptlvm /mnt/var/log # Chroot into the system sudo arch-chroot /mnt The cryptsetup open command unlocks the encrypted partition and maps it to /dev/mapper/cryptlvm. Each Btrfs subvolume needs to be mounted separately. The nodatacow option on /var/log prevents copy-on-write for log files. The arch-chroot command automatically handles mounting /proc, /sys, and /dev.

January 5, 2026 · 1 min · 131 words · rustikus