Skip to content
Snippets Groups Projects
packages.nix 569 B
Newer Older
# A NixOS module which exposes custom packages to other modules.
{ pkgs, ...}:
  # Get our custom packages; either from the nixpkgs attribute added via an
  # overlay in `morph/lib/default.nix`, or by importing them directly.
  ourpkgs = pkgs.ourpkgs or (pkgs.callPackage ../pkgs {});
  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;