mod/pkgmgmt: added support for nix garbage collection