fix(impermanence): mark /persist and /home neededForBoot
Some checks failed
Check / eval-and-lint (push) Failing after 5m56s

The impermanence module asserts that the persistent-storage volume and
every volume it bind-mounts into are available in early boot. Persisted
user dirs land under /home, so both /persist and the @home subvolume
must have neededForBoot = true. disko and nixos-generate-config leave it
at the default (false), so a fresh install with impermanence enabled
aborted with:

    All filesystems used for persistent storage must have the option
    "neededForBoot" set to true.
    Please fix the following filesystems: /persist /home

Declare neededForBoot in the module that imposes the requirement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Bernardo Magri
2026-06-02 19:34:04 +01:00
parent a84e903ae1
commit 27821c270f

View File

@@ -87,6 +87,17 @@ in
'';
};
# The impermanence module asserts that every filesystem it touches is
# available in early boot: the persistent-storage volume (/persist) and
# any volume it bind-mounts *into* — the user-persistence dirs land under
# /home, so the @home subvolume counts too. disko and
# nixos-generate-config leave neededForBoot at its default (false) on
# these subvolumes, which trips the assertion ("Please fix the following
# filesystems: /persist /home"). Declare it here, where the requirement
# originates.
fileSystems."/persist".neededForBoot = true;
fileSystems."/home".neededForBoot = true;
# 2. Persistence Configuration: What survives the wipe
environment.persistence."/persist" = {
hideMounts = true;