bcfs root?

This commit is contained in:
mjallen18
2025-08-20 22:09:53 -05:00
parent 92b04773b2
commit 6025b6c4f1

View File

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