1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-04 06:42:33 +03:00

nixos/bcachefs: include poly1305 and chacha20 kernel modules for kernel < 6.15

Kernel 6.16-rc1 removed the poly1305 algorithm in
ceef731b0e22df80a13d67773ae9afd55a971f9e

bcachefs switched to the kernel libraries for poly1305 and chacha20 in
6.15 in 4bf4b5046de0ef7f9dc50f3a9ef8a6dcda178a6d

(cherry picked from commit f9bd91aa07)
This commit is contained in:
qubitnano 2025-06-21 15:05:39 -04:00 committed by Masum Reza
parent a676066377
commit 3a69ec5f15

View file

@ -179,12 +179,17 @@ in
(lib.mkIf ((config.boot.initrd.supportedFilesystems.bcachefs or false) || (bootFs != { })) { (lib.mkIf ((config.boot.initrd.supportedFilesystems.bcachefs or false) || (bootFs != { })) {
inherit assertions; inherit assertions;
# chacha20 and poly1305 are required only for decryption attempts boot.initrd.availableKernelModules =
boot.initrd.availableKernelModules = [ [
"bcachefs" "bcachefs"
"sha256" "sha256"
"chacha20" ]
++ lib.optionals (config.boot.kernelPackages.kernel.kernelOlder "6.15") [
# chacha20 and poly1305 are required only for decryption attempts
# kernel 6.15 uses kernel api libraries for poly1305/chacha20: 4bf4b5046de0ef7f9dc50f3a9ef8a6dcda178a6d
# kernel 6.16 removes poly1305: ceef731b0e22df80a13d67773ae9afd55a971f9e
"poly1305" "poly1305"
"chacha20"
]; ];
boot.initrd.systemd.extraBin = { boot.initrd.systemd.extraBin = {
# do we need this? boot/systemd.nix:566 & boot/systemd/initrd.nix:357 # do we need this? boot/systemd.nix:566 & boot/systemd/initrd.nix:357