btrfs

Configure Btrfs flat subvolume layouts with impermanence on Linux/NixOS.

1|1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Jylhis/skills --skill btrfs-jylhis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: btrfs
Source: https://github.com/Jylhis/skills/tree/main/skills/btrfs
Command: npx skills add https://github.com/Jylhis/skills --skill btrfs-jylhis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Btrfs on Linux and NixOS can be complex to configure and maintain, particularly when balancing a flat subvolume layout, seamless snapshots, and persistence across boots. This skill provides guidance for implementing robust partitioning, subvolume strategies, and performance/safety best practices to reduce drift and manual tuning.

Core Features & Use Cases

  • Subvolume layout guidance for root, home, nix, persist, log, and swap to improve maintenance and snapshot behavior.
  • Impermanence pattern integration with declarative partitioning to enable reproducible boot states and rollback.
  • Performance and safety recommendations around compression options, dedup tooling, and NOCOW considerations for workloads like databases and store paths.

Quick Start

Configure a system with a flat subvolume layout (root, home, nix, persist, log, swap) and enable impermanence to ensure boot-time state matches configuration.

Frequently Asked Questions about btrfs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure a flat Btrfs subvolume layout for NixOS?

Btrfs snapshots in Linux capture filesystem states for seamless rollback. Pairing snapshots with a flat subvolume layout isolates system and user data, enabling targeted recovery without restoring the entire drive.

How does Btrfs impermanence work with declarative partitioning?

Btrfs impermanence uses declarative partitioning to reset non-persistent subvolumes on boot. By isolating ephemeral state into specific subvolumes, the system boots into a clean, reproducible configuration matching your declaration.

When should I use NOCOW on a Btrfs filesystem for databases?

Apply Btrfs compression to save space on general subvolumes, but use NOCOW for database workloads. Dedup tooling further reduces storage drift by eliminating duplicate blocks across persistent subvolumes.

Can I integrate Btrfs dedup tooling with impermanence patterns?

Btrfs dedup tooling integrates with impermanence by scanning persistent subvolumes like nix and persist to eliminate duplicate blocks. This reduces storage overhead while maintaining reproducible boot states across reboots.

What are the limitations of using Btrfs snapshots for system rollback?

Btrfs snapshots do not replace backups and can consume significant space if retained indefinitely. Snapshot strategies must balance retention frequency with available storage, especially when using impermanence to reset ephemeral state.