mirror of
https://github.com/nix-community/disko.git
synced 2026-12-03 14:33:28 +01:00
Fix(zfs_fs); Mount/Unmount with encryption
- Fix typo against full dataset path argument - Make unmount with encryption keys idempotent
This commit is contained in:
1 parent
a19c2b6d3a
commit
436fd911cf
1 file changed
+5
-1
@@ -143,7 +143,11 @@
|
|||||||
inherit config options;
|
inherit config options;
|
||||||
default =
|
default =
|
||||||
(lib.optionalAttrs (config.options.keylocation or "none" != "none") {
|
(lib.optionalAttrs (config.options.keylocation or "none" != "none") {
|
||||||
dev = "zfs unload-key ${config.name}";
|
dev = ''
|
||||||
|
if [ "$(zfs get keystatus ${config._name} -H -o value)" == "available" ]; then
|
||||||
|
zfs unload-key ${config._name}
|
||||||
|
fi
|
||||||
|
'';
|
||||||
})
|
})
|
||||||
// lib.optionalAttrs
|
// lib.optionalAttrs
|
||||||
(config.options.mountpoint or "" != "none" && config.options.canmount or "" != "off")
|
(config.options.mountpoint or "" != "none" && config.options.canmount or "" != "off")
|
||||||
|
|||||||
Reference in new issue
Block a user