Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,33 @@ in
}
```

If your configuration already provides `pkgs`, reuse it instead of importing Nixpkgs again. For
NixOS or nix-darwin, select the corresponding module just as in the flake examples above:
If your configuration already has a package set available independently of module arguments, pass
it as `pkgs` to reuse its Nixpkgs configuration and overlays.

Home Manager's usual `pkgs` module argument cannot be used to calculate that module's `imports`; it
is provided through the module graph after imports are collected. When your pinned inputs are
available through `home-manager.extraSpecialArgs`, pass the pinned Nixpkgs source instead. With
[Nixtamal](https://nixtamal.toast.al/):

```nix
# `nixtamal` is provided through `home-manager.extraSpecialArgs`.
{ nixtamal, ... }:

let
nixcord = import nixtamal.nixcord {
nixpkgs = nixtamal.nixpkgs;
};
in
{
imports = [ nixcord.homeModules.nixcord ];
}
```

This gives `nixcord.packages` a separate package set from the supplied Nixpkgs source; it does not
inherit the Home Manager package set's configuration or overlays. An empty argument set also works,
but uses Nixcord's bundled Nixpkgs pin for package outputs.

For NixOS or nix-darwin, select the corresponding module just as in the flake examples above:

```nix
# NixOS
Expand Down
Loading