Is there any simple way to run commands when rebuilding on nixos? or with home-manager? Like, is there a very featureful implementation of hooks, I wouldn’t mind something basic as running some commands, but id like to also pick when in the build process it’ll run, I know mkderivation has hooks but I am talking about in general.
Nix has a diff-hook, post-build-hook, pre-build-hook and build-hook.
The post-build-hook also has its own separate chapter: Using the post-build-hook - Nix Reference Manual