bcfs root?

This commit is contained in:
mjallen18
2025-08-20 22:09:53 -05:00
parent f1295e17d6
commit 1faa099900

View File

@@ -151,36 +151,36 @@ with lib;
bcachefs subvolume create /root_tmp/root bcachefs subvolume create /root_tmp/root
''; '';
}; };
assertions = [ # assertions = [
{ # {
assertion = hasAttr "/" config.fileSystems; # assertion = hasAttr "/" config.fileSystems;
message = "To use impermanence, you need to define a root volume"; # message = "To use impermanence, you need to define a root volume";
} # }
{ # {
assertion = # assertion =
if hasAttr "/" config.fileSystems then # if hasAttr "/" config.fileSystems then
config.fileSystems."/".fsType == "btrfs" || config.fileSystems."/".fsType == "bcachefs" # config.fileSystems."/".fsType == "btrfs" || config.fileSystems."/".fsType == "bcachefs"
else # else
false; # false;
message = "rootfs must be btrfs or bcachefs"; # message = "rootfs must be btrfs or bcachefs";
} # }
{ # {
assertion = # assertion =
if hasAttr "/" config.fileSystems then # if hasAttr "/" config.fileSystems then
any ( # any (
t: t == "subvol=root" || t == "subvol=/root" || t == "X-mount.subdir=root" # t: t == "subvol=root" || t == "subvol=/root" || t == "X-mount.subdir=root"
) config.fileSystems."/".options # ) config.fileSystems."/".options
else # else
false; # false;
message = "rootfs must mount subvolume root"; # message = "rootfs must mount subvolume root";
} # }
{ # {
assertion = !config.boot.isContainer; # assertion = !config.boot.isContainer;
message = "impermanence is not supported in containers"; # message = "impermanence is not supported in containers";
} # }
]; # ];
fileSystems."/persistent" = { fileSystems."/persistent" = {
neededForBoot = true; neededForBoot = true;