Append to zfs configureFlags

I dug deeper and found that the zfs kernel module prints a “debug” message when it loads if it has been compiled with debugging information. I’m not seeing it. I’ve worked my way through Nix Pills, scoured various forum posts and old notes that I have, and can’t come up with something that works. The closest I’ve gotten is something that lets nixos-rebuild boot work correctly, but when I boot, I’m still running the standard NixOS zfsUnstable without debugging.

Can anyone help me get over the line? Here’s the “latest and greatest”:

  nixpkgs.overlays = [
    (self: super: {
      linuxPackages_5_4 = super.linuxPackages_5_4 // {
        zfsUnstable = super.linuxPackages_5_4.zfsUnstable.overrideAttrs (
          old:
          {
            configureFlags = old.configureFlags ++ [ "--enable-debug" ];
          }
        );
      };
    })
  ];

  boot.kernelPackages = pkgs.linuxPackages_5_4;

Any help is greatly appreciated.