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

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

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