diff options
author | Ryan Lahfa <masterancpp@gmail.com> | 2022-12-22 01:12:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-22 01:12:38 +0100 |
commit | a10069fd242f411c729b1885722dedbc9d46e21b (patch) | |
tree | 88017923739ad40a4ef8ab02e4b32c5bbe0cafec /nixos | |
parent | 5431f7ccb28faabd449df573b781c4dd46fe767b (diff) | |
parent | c70f0473153c63ad1cf6fbea19f290db6b15291f (diff) |
Merge pull request #203524 from jakubgs/zfs/no-force-import-hibernate
nixos/zfs: assert no force import with hibernation
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 4b4f4cc801aba..0f14f2b501c22 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -503,6 +503,10 @@ in assertion = !cfgZfs.forceImportAll || cfgZfs.forceImportRoot; message = "If you enable boot.zfs.forceImportAll, you must also enable boot.zfs.forceImportRoot"; } + { + assertion = cfgZfs.allowHibernation -> !cfgZfs.forceImportRoot && !cfgZfs.forceImportAll; + message = "boot.zfs.allowHibernation while force importing is enabled will cause data corruption"; + } ]; boot = { |