diff options
author | sjau <github.com@sjau.ch> | 2018-02-03 17:29:31 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-02-07 20:46:16 +0000 |
commit | 0d65e2e0e5b318614bf967c71308355939d9aaaf (patch) | |
tree | 89681e9c21a0cf26e5c55378009f3a070c14bc17 /nixos/modules/tasks/filesystems | |
parent | 4442a377cb54ca6df3172fa0e7ac1268c30e0a69 (diff) | |
download | nixlib-0d65e2e0e5b318614bf967c71308355939d9aaaf.tar nixlib-0d65e2e0e5b318614bf967c71308355939d9aaaf.tar.gz nixlib-0d65e2e0e5b318614bf967c71308355939d9aaaf.tar.bz2 nixlib-0d65e2e0e5b318614bf967c71308355939d9aaaf.tar.lz nixlib-0d65e2e0e5b318614bf967c71308355939d9aaaf.tar.xz nixlib-0d65e2e0e5b318614bf967c71308355939d9aaaf.tar.zst nixlib-0d65e2e0e5b318614bf967c71308355939d9aaaf.zip |
zfs: add migration path for new crypto format
fixes #34559
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 2c0a165887bd..5d05b99b6976 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -24,7 +24,11 @@ let kernel = config.boot.kernelPackages; - packages = if config.boot.zfs.enableUnstable then { + packages = if config.boot.zfs.enableLegacyCrypto then { + spl = kernel.splLegacyCrypto; + zfs = kernel.zfsLegacyCrypto; + zfsUser = pkgs.zfsLegacyCrypto; + } else if config.boot.zfs.enableUnstable then { spl = kernel.splUnstable; zfs = kernel.zfsUnstable; zfsUser = pkgs.zfsUnstable; @@ -75,6 +79,27 @@ in ''; }; + enableLegacyCrypto = mkOption { + type = types.bool; + default = false; + description = '' + Enabling this option will allow you to continue to use the old format for + encrypted datasets. With the inclusion of stability patches the format of + encrypted datasets has changed. They can still be access and mounted but + in read-only mode mounted. It is highly recommended to convert them to + the new format. + + This option is only for convenience to people that cannot convert their + datasets to the new format yet and it will be removed in due time. + + For migration strategies from old format to this new one, check the Wiki: + https://nixos.wiki/wiki/NixOS_on_ZFS#Encrypted_Dataset_Format_Change + + See https://github.com/zfsonlinux/zfs/pull/6864 for more details about + the stability patches. + ''; + }; + extraPools = mkOption { type = types.listOf types.str; default = []; |