git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #111731 from Mic92/zfs-fix
commit993bbf7581527a8be13713e34d495127a9fc88d9 authorJörg Thalheim <Mic92@users.noreply.github.com> dateWed 3 Feb 2021, 11:03 (6 years ago) parent16f79365b9bfe5
1 file changed+4−4
nixos/modules/tasks/filesystems/zfs.nix+4−4
nixos/modules/tasks/filesystems/zfs.nix+4−4
@@ -513,7 +513,7 @@ in
513513 script = (importLib {
514514 # See comments at importLib definition.
515515 zpoolCmd = "${cfgZfs.package}/sbin/zpool";
516− zfsCmd = "${cfgZfs.package}/sbin/zfs";
516+ awkCmd = "${pkgs.gawk}/bin/awk";
517517 inherit cfgZfs;
518518 }) + ''
519519 poolImported "${pool}" && exit
@@ -528,7 +528,7 @@ in
528528 ${optionalString (if isBool cfgZfs.requestEncryptionCredentials
529529 then cfgZfs.requestEncryptionCredentials
530530 else cfgZfs.requestEncryptionCredentials != []) ''
531− ${packages.zfsUser}/sbin/zfs list -rHo name,keylocation ${pool} | while IFS=$'\t' read ds kl; do
531+ ${cfgZfs.package}/sbin/zfs list -rHo name,keylocation ${pool} | while IFS=$'\t' read ds kl; do
532532 (${optionalString (!isBool cfgZfs.requestEncryptionCredentials) ''
533533 if ! echo '${concatStringsSep "\n" cfgZfs.requestEncryptionCredentials}' | grep -qFx "$ds"; then
534534 continue
@@ -538,10 +538,10 @@ in
538538 none )
539539 ;;
540540 prompt )
541− ${config.systemd.package}/bin/systemd-ask-password "Enter key for $ds:" | ${packages.zfsUser}/sbin/zfs load-key "$ds"
541+ ${config.systemd.package}/bin/systemd-ask-password "Enter key for $ds:" | ${cfgZfs.package}/sbin/zfs load-key "$ds"
542542 ;;
543543 * )
544− ${packages.zfsUser}/sbin/zfs load-key "$ds"
544+ ${cfgZfs.package}/sbin/zfs load-key "$ds"
545545 ;;
546546 esac) < /dev/null # To protect while read ds kl in case anything reads stdin
547547 done