home-manager: fix missing inputs.self

some options in nvf module uses inputs.self but it's not exposed in the
inputs we pass to home-manager module:

example flake.nix:

```
{
	inputs = { /* ... */ };
	outputs = {nixpkgs, ...}@inputs: {
		testing = {
			a = inputs.self             # valid
			b = inputs.self.inputs      # valid
			c = inputs.self.inputs.self # does not exist

			# prior to this change, inputs.self.inputs was passed to the hm
			# module, which lacks the self attr
			#
			# This change passes in the "top-level" inputs instead.
		};
	};
}
```
This commit is contained in:
Ching Pei Yang 2025-02-16 11:52:39 +01:00
commit cdbf0a0df7
No known key found for this signature in database
GPG key ID: B3841364253DC4C8
2 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@
};
homeManagerModules = {
nvf = import ./flake/modules/home-manager.nix {inherit lib self;};
nvf = import ./flake/modules/home-manager.nix {inherit lib inputs;};
default = self.homeManagerModules.nvf;
neovim-flake =
lib.warn ''

View file

@ -1,13 +1,13 @@
# Home Manager module
{
self,
inputs,
lib,
}: {
config,
pkgs,
...
}: let
inherit (self) packages inputs;
inherit (inputs.self) packages;
inherit (lib) maintainers;
inherit (lib.modules) mkIf mkAliasOptionModule;
inherit (lib.lists) optional;
@ -19,7 +19,7 @@
nvfModule = submoduleWith {
description = "Nvf module";
class = "nvf";
specialArgs = {
specialArgs = lib.trace (builtins.attrNames inputs) {
inherit pkgs lib inputs;
};
modules = import ../../modules/modules.nix {inherit pkgs lib;};