nixos/btrfs: handle new checksum types in initrd
Can't mount a root formatted with those otherwise (cherry picked from commit e85f2f43bda6e0fe245005b710091f854a7f0200)
This commit is contained in:
parent
d3ebf03151
commit
95fc4eb09d
|
@ -55,7 +55,16 @@ in
|
||||||
(mkIf enableBtrfs {
|
(mkIf enableBtrfs {
|
||||||
system.fsPackages = [ pkgs.btrfs-progs ];
|
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
|
boot.initrd.extraUtilsCommands = mkIf inInitrd
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in New Issue