# refind-btrfs-snapshots configuration file # This file configures the behavior of the rEFInd btrfs snapshot boot generator # Snapshot Configuration snapshot: # Directories to search for snapshots (relative to filesystem root or absolute paths) # NOTE: If using systemd path-based triggers, update refind-btrfs-snapshots.path # with 'sudo systemctl edit refind-btrfs-snapshots.path' to match these directories search_directories: - "/.snapshots" # Maximum depth to search in snapshot directories max_depth: 3 # Number of most recent snapshots to include in boot menu # Set to 0 or -1 to include all snapshots selection_count: 0 # Directory where writable snapshots will be created (if create_writable is true) destination_dir: "/.refind-btrfs-snapshots" # How to handle making snapshots writable for booting: # "copy": Create writable copies in destination_dir (uses more space) # "toggle": Toggle read-only flag on original snapshots (space efficient) writable_method: "toggle" # rEFInd Configuration refind: # Path to main rEFInd configuration file (this will be prefixed with the ESP mount point) config_path: "/EFI/refind/refind.conf" # EFI System Partition (ESP) Configuration esp: # Preference order: uuid (if set) > auto_detect > mount_point # Specific ESP UUID to use (highest priority - overrides all other detection) # Leave empty to use other detection methods uuid: "" # Automatically detect ESP location (used if uuid is empty) auto_detect: true # ESP mount point (lowest priority - used only if auto_detect is false and uuid is empty) mount_point: "" # Behavior Configuration behavior: # Exit with error if currently booted from a snapshot # This prevents accidental snapshot generation from within a snapshot exit_on_snapshot_boot: true # Clean up old writable snapshots that exceed selection_count cleanup_old_snapshots: true # Logging Configuration log_level: "info" # trace, debug, info, warn, error, fatal, panic # Display Configuration display: # Use local time instead of UTC for timestamps (default: false, uses UTC) local_time: false # Kernel Detection & Stale Snapshot Handling kernel: # What to do when a snapshot's kernel modules don't match the ESP kernel: # "delete" - Skip the boot entry entirely — stale snapshots won't appear in the menu (default) # "warn" - Log a warning but generate the boot entry normally # "disable" - Generate the boot entry with a 'disabled' directive (visible but not bootable) # "fallback" - Use the fallback initramfs (auto-downgrades to 'disable' if unavailable) stale_snapshot_action: "delete" # Boot image detection patterns (optional - sensible defaults cover Arch, Debian, Fedora, Gentoo) # Uncomment and customize only if your system uses non-standard kernel/initramfs filenames. # Patterns are evaluated in order; first match wins per file. # # boot_image_patterns: # - glob: "initramfs-*-fallback.img" # role: fallback_initramfs # strip_prefix: "initramfs-" # strip_suffix: "-fallback.img" # - glob: "initramfs-*.img" # role: initramfs # strip_prefix: "initramfs-" # strip_suffix: ".img" # - glob: "vmlinuz-*" # role: kernel # strip_prefix: "vmlinuz-" # - glob: "vmlinuz" # role: kernel # kernel_name: "linux" # - glob: "intel-ucode.img" # role: microcode # - glob: "amd-ucode.img" # role: microcode # Advanced Options advanced: # Snapshot naming configuration naming: # Timestamp format used in writable snapshot filenames: rwsnap_{rwsnap_format}_ID{id} # Uses Go time format (reference: Mon Jan 2 15:04:05 MST 2006) # IMPORTANT: Must be filesystem-safe (no special characters like / : < > | etc.) rwsnap_format: "2006-01-02_15-04-05" # Menu entry display format used in boot menu titles: "Original Title ({menu_format})" # Supports both Go time format and custom templates with placeholders # See https://pkg.go.dev/time#Time.Format for Go time format documentation # # Go time format examples: # "2006-01-02T15:04:05Z" -> "2025-06-14T17:32:09Z" # "Jan 02, 2006 15:04" -> "Jun 14, 2025 17:32" # # Custom template examples (with placeholders YYYY, YY, MM, DD, HH, mm, ss): # "btrfs snapshot: YYYY/MM/DD-HH:mm" -> "btrfs snapshot: 2025/06/14-17:32" # "snapshot-YYYY-MM-DD" -> "snapshot-2025-06-14" # "backup YY.MM.DD HH:mm" -> "backup 25.06.14 17:32" menu_format: "2006-01-02T15:04:05Z"