From 8af949a2ad92769aed43e6228f1be0a1dd655b5c Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sat, 1 Aug 2026 01:21:10 +0200 Subject: [PATCH 1/2] Add note for nixtamal in home-manager / other configs in README.md --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f5f2200b..aa19bddd 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,17 @@ in } ``` -If your configuration already provides `pkgs`, reuse it instead of importing Nixpkgs again. For +**If your configuration already provides `pkgs`, reuse it instead of importing Nixpkgs again.** + +Or if you're using something like [nixtamal](https://nixtamal.toast.al/) inside home-manager and/or can't use `pkgs` you can write: +```nix +let + nixcord = import nixtamal.nixcord { nixpkgs = nixtamal.nixpkgs; }; +in +... +``` + +For NixOS or nix-darwin, select the corresponding module just as in the flake examples above: ```nix From a605bf6322d63cf73219933baa4836d30d284b9f Mon Sep 17 00:00:00 2001 From: 4evy Date: Sat, 1 Aug 2026 12:49:06 +0300 Subject: [PATCH 2/2] docs: clarify non-flake module imports --- README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aa19bddd..0a96017d 100644 --- a/README.md +++ b/README.md @@ -130,18 +130,33 @@ in } ``` -**If your configuration already provides `pkgs`, reuse it instead of importing Nixpkgs again.** +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/): -Or if you're using something like [nixtamal](https://nixtamal.toast.al/) inside home-manager and/or can't use `pkgs` you can write: ```nix +# `nixtamal` is provided through `home-manager.extraSpecialArgs`. +{ nixtamal, ... }: + let - nixcord = import nixtamal.nixcord { nixpkgs = nixtamal.nixpkgs; }; + nixcord = import nixtamal.nixcord { + nixpkgs = nixtamal.nixpkgs; + }; in -... +{ + imports = [ nixcord.homeModules.nixcord ]; +} ``` -For -NixOS or nix-darwin, select the corresponding module just as in the flake examples above: +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