# A NixOS module which exposes custom packages to other modules. { pkgs, ...}: let ourpkgs = pkgs.callPackage ../../nixos/pkgs {}; in { config = { # Expose `nixos/pkgs` as a new module argument `ourpkgs`. _module.args.ourpkgs = ourpkgs; # Also expose it as a config setting, for usage by tests, # since the `_module` config is not exposed in the result. passthru.ourpkgs = ourpkgs; }; }