mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08: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:
@@ -179,13 +179,18 @@ in
|
||||
|
||||
(lib.mkIf ((config.boot.initrd.supportedFilesystems.bcachefs or false) || (bootFs != { })) {
|
||||
inherit assertions;
|
||||
# chacha20 and poly1305 are required only for decryption attempts
|
||||
boot.initrd.availableKernelModules = [
|
||||
"bcachefs"
|
||||
"sha256"
|
||||
"chacha20"
|
||||
"poly1305"
|
||||
];
|
||||
boot.initrd.availableKernelModules =
|
||||
[
|
||||
"bcachefs"
|
||||
"sha256"
|
||||
]
|
||||
++ 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"
|
||||
"chacha20"
|
||||
];
|
||||
boot.initrd.systemd.extraBin = {
|
||||
# do we need this? boot/systemd.nix:566 & boot/systemd/initrd.nix:357
|
||||
"bcachefs" = "${pkgs.bcachefs-tools}/bin/bcachefs";
|
||||
|
||||
Reference in New Issue
Block a user