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

Cant get home-manager running with minimal conf #79

Open
UnknownHiker opened this issue May 29, 2024 · 2 comments
Open

Cant get home-manager running with minimal conf #79

UnknownHiker opened this issue May 29, 2024 · 2 comments

Comments

@UnknownHiker
Copy link

UnknownHiker commented May 29, 2024

I deployed the minimal conf.
But when i want to run: home-manager switch --flake .#username@hostname (ofc with my user and hostname)
It says "The program 'home-manager' is not in your PATH."

But shouldnt it be installed when running sudo nixos-rebuild switch --flake .#nixos
The Flake and my stuff in configuration.nix works just fine tho. Just cant get home manager running.

Also i can find a lot of home-manager related stuff in /nix/store....

My configuration:

Folder Structure, same like suggested in Readme:
➜ nix-config ls flake.lock flake.nix home-manager nixos

My flake.nix:

{
  description = "NixOS Config";

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

    # Home manager
    home-manager.url = "github:nix-community/home-manager/release-23.11";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = {
    self,
    nixpkgs,
    unstable,
    home-manager,
    ...
  } @ inputs: let
    inherit (self) outputs;
  in {
    # NixOS configuration entrypoint
    # Available through 'nixos-rebuild --flake .#your-hostname'
    nixosConfigurations = {
      nixos = nixpkgs.lib.nixosSystem {
        specialArgs = {inherit inputs outputs;};
        # > Our main nixos configuration file <
        modules = [
          ./nixos/configuration.nix
          {
            nixpkgs.overlays = [
              (final: prev: {
                unstablePkgs = import unstable { 
                  config = { allowUnfree = true; };
                  inherit (final) system; 
                };
              })
            ];
          }
        ];
      };
    };

    # Standalone home-manager configuration entrypoint
    # Available through 'home-manager --flake .#your-username@your-hostname'
    homeConfigurations = {
      "user@nixos" = home-manager.lib.homeManagerConfiguration {
        pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
        extraSpecialArgs = {inherit inputs outputs;};
        # > Our main home-manager configuration file <
        modules = [./home-manager/home.nix];
      };
    };
  };
}
@UnknownHiker UnknownHiker changed the title Flake running fine on minimal conf, but cant get home-manager running Cant get home-manager running May 29, 2024
@UnknownHiker UnknownHiker changed the title Cant get home-manager running Cant get home-manager running with minimal conf May 29, 2024
@amardeep
Copy link

amardeep commented Jun 4, 2024

README suggests the following in USAGE section:

Run home-manager switch --flake .#username@hostname to apply your home configuration.
If you don't have home-manager installed, try nix shell nixpkgs#home-manager.

@UnknownHiker
Copy link
Author

Im running it as a submodule of Nix right now, cause i couldnt get it run separate.

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

2 participants