diff options
author | Atemu <atemu.main@gmail.com> | 2021-07-06 15:57:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-06 09:57:10 -0400 |
commit | f879395bd9cfd3ce453eb546aa272f34f7c5876c (patch) | |
tree | 12a27f285dfa122a7061c37f7efa3ae2bd09c7bb /nixos/modules/tasks/filesystems | |
parent | 2337680a13fc894b64aec2fcc2c86302ee70f43d (diff) | |
download | nixlib-f879395bd9cfd3ce453eb546aa272f34f7c5876c.tar nixlib-f879395bd9cfd3ce453eb546aa272f34f7c5876c.tar.gz nixlib-f879395bd9cfd3ce453eb546aa272f34f7c5876c.tar.bz2 nixlib-f879395bd9cfd3ce453eb546aa272f34f7c5876c.tar.lz nixlib-f879395bd9cfd3ce453eb546aa272f34f7c5876c.tar.xz nixlib-f879395bd9cfd3ce453eb546aa272f34f7c5876c.tar.zst nixlib-f879395bd9cfd3ce453eb546aa272f34f7c5876c.zip |
nixos/btrfs: handle new checksum types in initrd (#126158)
Can't mount a root formatted with those otherwise
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r-- | nixos/modules/tasks/filesystems/btrfs.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/btrfs.nix b/nixos/modules/tasks/filesystems/btrfs.nix index c0ff28039b16..ae1dab5b8d8d 100644 --- a/nixos/modules/tasks/filesystems/btrfs.nix +++ b/nixos/modules/tasks/filesystems/btrfs.nix @@ -55,7 +55,16 @@ in (mkIf enableBtrfs { system.fsPackages = [ pkgs.btrfs-progs ]; - boot.initrd.kernelModules = mkIf inInitrd [ "btrfs" "crc32c" ]; + boot.initrd.kernelModules = mkIf inInitrd [ "btrfs" ]; + boot.initrd.availableKernelModules = mkIf inInitrd ( + [ "crc32c" ] + ++ optionals (config.boot.kernelPackages.kernel.kernelAtLeast "5.5") [ + # Needed for mounting filesystems with new checksums + "xxhash_generic" + "blake2b_generic" + "sha256_generic" # Should be baked into our kernel, just to be sure + ] + ); boot.initrd.extraUtilsCommands = mkIf inInitrd '' |