mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01: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
1 changed files with 9 additions and 0 deletions
|
@ -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 a new issue