feat: add btrfs + btrbk module for Poup_16T data disk #74

Open
Hermes wants to merge 2 commits from feat/temp-16tb-btrbk into master
Collaborator

Adds btrfs support and btrbk snapshot management for the 16TB WD Red Pro data disk at /mnt/Poup_16T/.

Changes

New module: modules/nixos/filesystem/poup-16t-disk.nix

A complete NixOS module for the 16TB disk, configurable via gortium.poup16t.* options:

Setting Default Purpose
enable false Master switch
luksUuid (required) UUID of the LUKS2 partition
luksName poup_16t /dev/mapper/ name
mountPoint /mnt/Poup_16T Where to mount
btrfsOptions defaults,noatime,compress=zstd:3,nofail Mount options
btrbk.enable true Enable btrbk snapshots
btrbk.schedule daily systemd timer
btrbk.preserve 14d 4w 3m Retention: 14 daily, 4 weekly, 3 monthly
btrbk.snapshotDir .snapshots Snapshot storage location

What it does when enabled:

  • Adds btrfs to boot.supportedFilesystems (kernel-in-tree, no DKMS)
  • Installs btrfs-progs + btrbk
  • Configures LUKS2 auto-unlock via initrd (boot.initrd.luks.devices)
  • Mounts at /mnt/Poup_16T with zstd:3 compression + nofail
  • Sets up btrbk daily timer for snapshot creation/rotation

Wiring:

  • Registered in flake.nix for lazyworkhorse host
  • Host config updated with commented-out enable block

⚠ Required setup (disk-side)

Disk currently disconnected. When reconnected:

lsblk -o NAME,SIZE,FSTYPE,UUID /dev/sdb
sudo blkid /dev/sdb
# Update hosts/lazyworkhorse/configuration.nix:
# Uncomment gortium.poup16t block, set luksUuid
# nh os switch --flake /home/gortium/infra#lazyworkhorse
Adds btrfs support and btrbk snapshot management for the 16TB WD Red Pro data disk at `/mnt/Poup_16T/`. ## Changes ### New module: `modules/nixos/filesystem/poup-16t-disk.nix` A complete NixOS module for the 16TB disk, configurable via `gortium.poup16t.*` options: | Setting | Default | Purpose | |---------|---------|---------| | `enable` | false | Master switch | | `luksUuid` | (required) | UUID of the LUKS2 partition | | `luksName` | `poup_16t` | /dev/mapper/ name | | `mountPoint` | `/mnt/Poup_16T` | Where to mount | | `btrfsOptions` | `defaults,noatime,compress=zstd:3,nofail` | Mount options | | `btrbk.enable` | true | Enable btrbk snapshots | | `btrbk.schedule` | `daily` | systemd timer | | `btrbk.preserve` | `14d 4w 3m` | Retention: 14 daily, 4 weekly, 3 monthly | | `btrbk.snapshotDir` | `.snapshots` | Snapshot storage location | ### What it does when enabled: - Adds `btrfs` to `boot.supportedFilesystems` (kernel-in-tree, no DKMS) - Installs `btrfs-progs` + `btrbk` - Configures LUKS2 auto-unlock via initrd (`boot.initrd.luks.devices`) - Mounts at `/mnt/Poup_16T` with zstd:3 compression + nofail - Sets up btrbk daily timer for snapshot creation/rotation ### Wiring: - Registered in `flake.nix` for `lazyworkhorse` host - Host config updated with **commented-out** enable block ## ⚠ Required setup (disk-side) Disk currently disconnected. When reconnected: ```bash lsblk -o NAME,SIZE,FSTYPE,UUID /dev/sdb sudo blkid /dev/sdb # Update hosts/lazyworkhorse/configuration.nix: # Uncomment gortium.poup16t block, set luksUuid # nh os switch --flake /home/gortium/infra#lazyworkhorse ```
Hermes added 1 commit 2026-06-17 18:52:07 +00:00
- New module: modules/nixos/filesystem/temp-16tb-disk.nix with btrfs kernel support, btrfs-progs + btrbk, LUKS2 auto-unlock, nofail mount, btrbk daily snapshots (14d/4w/3m)
- Registered in flake.nix for lazyworkhorse
- Host config with commented-out enable block (fill UUID when disk reconnected)
Hermes added 1 commit 2026-06-17 18:57:45 +00:00
- Module renamed to poup-16t-disk.nix
- Option namespace: gortium.poup16t (was gortium.temp16tb)
- LUKS name: poup_16t (was temp_16tb)
- Mount point: /mnt/Poup_16T (was /mnt/temp_16tb)
- btrbk instance: poup16t (was temp16tb)
- flake.nix import and host config updated
Hermes changed title from feat: add btrfs + btrbk module for 16TB data disk (temp_16tb) to feat: add btrfs + btrbk module for Poup_16T data disk 2026-06-17 18:59:14 +00:00
This pull request has changes conflicting with the target branch.
  • assets/compose
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/temp-16tb-btrbk:feat/temp-16tb-btrbk
git checkout feat/temp-16tb-btrbk
Sign in to join this conversation.
No description provided.