summary refs log tree commit diff
path: root/nixos/modules/system/boot/luksroot.nix
diff options
context:
space:
mode:
authorAristid Breitkreuz <aristidb@gmail.com>2018-02-25 21:36:19 +0100
committerAristid Breitkreuz <aristidb@gmail.com>2018-02-26 22:19:12 +0100
commitb8f4df9d9e5ca70b6a873957e5b0899bb3b892dd (patch)
tree33d8ef0aba3901552ea3579b19ea5e3bf718f1bb /nixos/modules/system/boot/luksroot.nix
parenta06b81b8ad53166738f55880b9e771a41b0fa357 (diff)
downloadnixpkgs-b8f4df9d9e5ca70b6a873957e5b0899bb3b892dd.tar
nixpkgs-b8f4df9d9e5ca70b6a873957e5b0899bb3b892dd.tar.gz
nixpkgs-b8f4df9d9e5ca70b6a873957e5b0899bb3b892dd.tar.bz2
nixpkgs-b8f4df9d9e5ca70b6a873957e5b0899bb3b892dd.tar.lz
nixpkgs-b8f4df9d9e5ca70b6a873957e5b0899bb3b892dd.tar.xz
nixpkgs-b8f4df9d9e5ca70b6a873957e5b0899bb3b892dd.tar.zst
nixpkgs-b8f4df9d9e5ca70b6a873957e5b0899bb3b892dd.zip
attempt to fix #30940 more robustly
Diffstat (limited to 'nixos/modules/system/boot/luksroot.nix')
-rw-r--r--nixos/modules/system/boot/luksroot.nix9
1 files changed, 4 insertions, 5 deletions
diff --git a/nixos/modules/system/boot/luksroot.nix b/nixos/modules/system/boot/luksroot.nix
index eefee5a479e..8b390e1b60c 100644
--- a/nixos/modules/system/boot/luksroot.nix
+++ b/nixos/modules/system/boot/luksroot.nix
@@ -228,10 +228,6 @@ in
         [ "aes" "aes_generic" "blowfish" "twofish"
           "serpent" "cbc" "xts" "lrw" "sha1" "sha256" "sha512"
 
-          # workaround until https://marc.info/?l=linux-crypto-vger&m=148783562211457&w=4 is merged
-          # remove once 'modprobe --show-depends xts' shows ecb as a dependency
-          "ecb"
-
           (if pkgs.stdenv.system == "x86_64-linux" then "aes_x86_64" else "aes_i586")
         ];
       description = ''
@@ -441,7 +437,10 @@ in
     # Some modules that may be needed for mounting anything ciphered
     # Also load input_leds to get caps lock light working (#12456)
     boot.initrd.availableKernelModules = [ "dm_mod" "dm_crypt" "cryptd" "input_leds" ]
-      ++ luks.cryptoModules;
+      ++ luks.cryptoModules
+      # workaround until https://marc.info/?l=linux-crypto-vger&m=148783562211457&w=4 is merged
+      # remove once 'modprobe --show-depends xts' shows ecb as a dependency
+      ++ (if builtins.elem "xts" luks.cryptoModules then ["ecb"] else []);
 
     # copy the cryptsetup binary and it's dependencies
     boot.initrd.extraUtilsCommands = ''