Commit f9bd91aa authored by qubitnano's avatar qubitnano Committed by Masum Reza
Browse files

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
parent 6c0d4491
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -206,12 +206,17 @@ 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 = [
        boot.initrd.availableKernelModules =
          [
            "bcachefs"
            "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"
            "chacha20"
          ];
        boot.initrd.systemd.extraBin = {
          # do we need this? boot/systemd.nix:566 & boot/systemd/initrd.nix:357