I have a custom kernel patch build here: https://github.com/YellowOnion/nur-bcachefs/blob/06bec3f45ec19b7d03ff3ac006291eddf959211f/pkgs/bcachefs-kernel/default.nix
Building the kernel with
nix-build builds the kernel fine.
But when I try to include it in an overlay, and use some other kernel patches, and then issue
nixos-rebuild build, nixos applies the patch twice and fails.
Why is this applying the patch twice?