persistence-migration

Migrates NixOS impermanence path layouts when mounting conflicts occur.

Updated Jan 25, 2024
One-click install
npx skills add https://github.com/axelcool1234/.dotfiles --skill persistence-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: persistence-migration
Source: https://github.com/axelcool1234/.dotfiles/tree/main/wrappers/code/skills/persistence-migration
Command: npx skills add https://github.com/axelcool1234/.dotfiles --skill persistence-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Use this skill to migrate impermanence path layouts when activation fails due to conflicting mounts, such as moving a directory to several subpaths, converting a directory into individual files, or changing a persisted file into a directory.

Core Features & Use Cases

  • Safe detachment of child mounts before the old parent to avoid data loss or activation errors.
  • Blocking target removal and reconfiguration of persistence layouts to fit the new structure.
  • Verification of activation and correctness of the new mount configuration.

Quick Start

Run the migration workflow to convert the path layout and re-run activation to verify the new persistence setup.

Frequently Asked Questions about persistence-migration

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

FAQPage Schema
Why does NixOS impermanence activation fail with 'target is busy' when changing persistence layouts?

NixOS impermanence activation fails with 'target is busy' when existing mount points conflict with new path structures, such as splitting a persisted directory into subdirectories or converting a file into a directory. The migration workflow resolves this by detaching old mounts and removing blocking targets before re-running activation.

How do I safely migrate impermanence path layouts from a directory to individual files?

To safely migrate impermanence path layouts from a directory to individual files, run the defined migration workflow: inspect the current mounts, stop child mounts, detach the old parent mount, remove blocking targets, and re-run system activation to verify the new persistence setup.

What happens if I detach an old parent mount before stopping its child mounts in NixOS?

Detaching an old parent mount before stopping child mounts risks data loss and activation errors. Safe impermanence migration requires stopping child mounts first to cleanly detach the parent and reconfigure the persistence layout without conflicts.

How do I fix 'A file already exists' errors during NixOS system activation?

Fix 'A file already exists' errors during NixOS system activation by removing blocking targets that conflict with the new persistence layout. The migration workflow inspects mounts, detaches the old structure, clears the blocking file or directory, and re-runs activation.

When do I need to use a migration workflow for impermanence mounts?

You need an impermanence mount migration workflow when changing persisted path layouts, such as splitting a directory into subpaths, breaking a directory into individual files, or changing a persisted file into a directory, which causes mounting conflicts during activation.

Can I convert a persisted file into a directory without losing data in NixOS impermanence?

You can convert a persisted file into a directory safely by using a migration workflow that stops child mounts, detaches the old mount, removes the blocking file target, and re-runs activation to apply and verify the new mount configuration.