neuron-notes derivation and the module is decoupled right now. services.neuron.package defaults to neuron-notes attribute of pkgs argument passed by the module system, if services.neuron.package is not defined. To use a custom derivation, you can either use an overlay that overwrites neuron-notes attribute of pkgs or you can define services.neuron.package.
For example, if you want to use the neuron derivation from the repository, you can do
I think the reason IFD’s are looked down upon and not allowed in Nixpkgs is that they reduce Hydra’s parallelism ^1. Nix wiki page about IFD says the following
… As a rule of thumb, if you can avoid IFD by refactoring Nix code or moving your build logic into the derivations themselves, you should do so.
I don’t think it is possible to refactor the above Nix expression to avoid IFD’s, since it is only fetching external files. What we can do is fetch the dependencies before the evaluation starts. This could be done by using Flakes, niv or something similar.