Skip to content

fix(modules): pass inputs to NixOS-integrated home-manager - #400

Open
github-actions[bot] wants to merge 1 commit into
masterfrom
fix/home-manager-inputs-specialargs
Open

fix(modules): pass inputs to NixOS-integrated home-manager#400
github-actions[bot] wants to merge 1 commit into
masterfrom
fix/home-manager-inputs-specialargs

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

What broke

The Build & Cache workflow failed on master for every host (pegasus, blackbird, galactica, basestar, raider, router) with:

error: attribute 'inputs' missing
  at /home/runner/work/nixos/nixos/home/home.nix:21:19:
      21|   pkgs-unstable = import inputs.nixpkgs-unstable {

Classification: real code bug (not transient CI infra) — the same eval error hit all hosts.

Root cause

Commit 2f8b55c ("home: pass inputs to home-manager, use unstable zoxide…") introduced pkgs-unstable = import inputs.nixpkgs-unstable {…} in home/home.nix, making the module depend on the inputs special arg.

It correctly added extraSpecialArgs = {inherit inputs;} to the standalone legacyPackages.homeConfigurations.arosenfeld in flake-modules/dev.nix — but home/home.nix is also imported by the NixOS-integrated home-manager module in flake-modules/lib.nix (homeManagerModulesForhome-manager.users.arosenfeld = import ../home/home.nix). NixOS specialArgs are not forwarded to home-manager user modules, and no home-manager.extraSpecialArgs was set there, so inputs was undefined for every nixosConfigurations.<host> build.

Fix

Add home-manager.extraSpecialArgs = {inherit inputs;}; to homeManagerModulesFor in flake-modules/lib.nix, mirroring the working pattern already used for the standalone home config in dev.nix.

Testing

No Nix toolchain is available in the CI-fix environment, so this is a log-based fix. The change is a one-line addition that mirrors the exact pattern already proven to work in dev.nix, and matches alejandra formatting used elsewhere in the file. CI on this PR will confirm all hosts build.

🤖 Generated with Claude Code

Commit 2f8b55c added extraSpecialArgs = {inherit inputs;} to the
standalone homeConfigurations in dev.nix, but home.nix is also imported
by the NixOS-integrated home-manager module in lib.nix, which was not
given inputs. Since home.nix now references inputs.nixpkgs-unstable,
every host build failed with `error: attribute 'inputs' missing`.

Add home-manager.extraSpecialArgs = {inherit inputs;} to
homeManagerModulesFor so inputs is available inside home.nix.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants