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

problems with home-manager.nixosModules.home-manager #489

Open
Blezz-tech opened this issue May 1, 2024 · 1 comment
Open

problems with home-manager.nixosModules.home-manager #489

Blezz-tech opened this issue May 1, 2024 · 1 comment
Labels
question Generally ask questions

Comments

@Blezz-tech
Copy link

Blezz-tech commented May 1, 2024

nixd works for home-manager.nixosModules.home-manager somehow partially

Shows the versions of the programs
image

But let's try to get hints for programs from the home-manager
image

Not work helper message
image

my flake.nix

{
  description = "Jenya NixOS Flake Configuration";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, home-manager, ... }@inputs: {
    nixosConfigurations = {
      "pc-full" = nixpkgs.lib.nixosSystem {
        specialArgs = { inherit inputs; };
        modules = [
          ./nixos
          home-manager.nixosModules.home-manager
          {
            home-manager = {
              useGlobalPkgs = true;
              useUserPackages = true;
              users.jenya = import ./home;
              extraSpecialArgs.inputs = inputs;
            };
          }
        ];
      };
    };
  };
}
@Blezz-tech Blezz-tech changed the title home-manager as nixos module not worked problems with home-manager.nixosModules.home-manager May 1, 2024
@inclyc
Copy link
Member

inclyc commented May 2, 2024

users.jenya = import ./home;

Looks like you are using HM attributes in an nested import. It's generally hard to check this dataflow. (i.e. nixd cannot know imported file will be used as a part of NixOS modules, or HM modules, or nested in some attribute paths.

Maybe you could write standalone HM options and follow nixd examples in this repo.

@inclyc inclyc added the question Generally ask questions label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Generally ask questions
Projects
None yet
Development

No branches or pull requests

2 participants