+++ date = "2023-01-21T15:10:45+00:00" lastmod = "2023-01-21T15:10:46+00:00" tags = [ "nixos" ] author = "tdro" +++ Look at [this Makefile](https://github.com/linux-apfs/linux-apfs-rw/blob/97863ab914bdb6b3bcb1296a1ab8da53400291be/Makefile) --- then look at this [NixOS package derivation](https://github.com/NixOS/nixpkgs/blob/f9b83ece2bc18d3e297159a76e7d0c8011bd55bc/pkgs/os-specific/linux/apfs/default.nix). Appears simple but I couldn't for the life of me divine how to quickly compile a custom/patched kernel module on NixOS. Abstractions... are very magical. The guide is cool and all, but it's a better time investment to guesstimate the relationship between the higher/lower layer. This [friendly example](https://nixos.wiki/wiki/Linux_kernel#Out-of-tree_kernel_modules) looks more like [this in reality](https://micro.thedroneely.com/m/tdro/messages/cs8409/) though ;-)