mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
Merge pull request #238021 from dcarosone/empty-zpool-name-assertion
nixos/zfs: assert that pool names are not empty
This commit is contained in:
commit
e57b65abbb
@ -523,6 +523,15 @@ in
|
||||
assertion = cfgZfs.allowHibernation -> !cfgZfs.forceImportRoot && !cfgZfs.forceImportAll;
|
||||
message = "boot.zfs.allowHibernation while force importing is enabled will cause data corruption";
|
||||
}
|
||||
{
|
||||
assertion = !(elem "" allPools);
|
||||
message = ''
|
||||
Automatic pool detection found an empty pool name, which can't be used.
|
||||
Hint: for `fileSystems` entries with `fsType = zfs`, the `device` attribute
|
||||
should be a zfs dataset name, like `device = "pool/data/set"`.
|
||||
This error can be triggered by using an absolute path, such as `"/dev/disk/..."`.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
Loading…
Reference in New Issue
Block a user