Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: attribute 'inputs' missing. #312026

Closed
1 task done
lVentus opened this issue May 7, 2024 · 2 comments
Closed
1 task done

error: attribute 'inputs' missing. #312026

lVentus opened this issue May 7, 2024 · 2 comments

Comments

@lVentus
Copy link

lVentus commented May 7, 2024

Platform

surface pro 8

  • Linux:

Additional information

I try to install hyprland plugins in HM, the instruction is:

wayland.windowManager.hyprland.plugins = [
inputs.hyprland-plugins.packages.${pkgs.system}.hyprbars
];
I get the
error : attribute 'inputs' missing.

But I have passed the inputs to HM:

modules = [
./hosts/surface

      nixos-hardware.nixosModules.microsoft-surface-pro-intel

      home-manager.nixosModules.home-manager {

        home-manager.useGlobalPkgs = true;
        home-manager.useUserPackages = true;
        home-manager.extraSpecialArgs = inputs;
    
        home-manager.users.ventus = import ./home;
      }
    ];

it doesn't work.
and then I tried to add these inputs manualy:

{pkgs, inputs, lib, hyprland-plugins, hyprgrass, ...}:

then it is the new error:

Output

Output


-- Setting precompiled headers
-- Setting link libraries
Could not open input file: No such file or directory
Could not open input file: No such file or directory
Could not open input file: No such file or directory
Could not open input file: No such file or directory
Couldn't load proto
-- Checking for module 'tomlplusplus'
--   Found tomlplusplus, version 3.4.0
-- Configuring incomplete, errors occurred!

Priorities

Add 👍 to issues you find important.

@fricklerhandwerk fricklerhandwerk transferred this issue from NixOS/nix May 15, 2024
@V3ntus
Copy link

V3ntus commented May 22, 2024

Hey, I had this same issue as you where I tried to pass inputs to extraSpecialArgs. This comment helped though: nix-community/home-manager#1698 (comment)

Basically, instead of passing inputs broadly, just inherit the specific inputs you would like:

{
	inputs = {
		apple-fonts = { #... };
	};
	outputs = {self, nixpkgs, home-manager, apple-fonts, ...} @ inputs: nixosConfigurations = {
		user = nixpkgs.lib.nixosSystem {
			modules = [
				home-manager.nixosModules.home-manager {
					home-manager.extraSpecialArgs = {inherit apple-fonts;};
				}
			];
		};
	};
}

@Aleksanaa
Copy link
Member

Sorry, this seems to be a skill issue, not an issue with nixpkgs or home-manager. In short, specialArgs in inputs.nixpkgs.lib.nixosSystem defines which arguments you want to pass to each separated modules. You may need something like

{
	inputs = {
		nixpkgs.url = "...";
		home-manager.url = "...";
	};

	outputs = inputs: {
		nixosConfigurations = {
			nixos-machine = inputs.nixpkgs.lib.nixosSystem {
				system = "x86_64-linux";
				# ...
				specialArgs = {
					inherit inputs;
				};
			};
		};
	};
}

So you can write

{ inputs, ... }:

{
	# ...
}

in modules.

It is worth noting that here or the nix repo issues are not very suitable places to ask questions. You can go to https://discourse.nixos.org or https://matrix.to/#/#users:nixos.org to get more help.

@Aleksanaa Aleksanaa closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
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

No branches or pull requests

3 participants