Skip to content

Cant get home-manager running with minimal conf #79

@UnknownHiker

Description

@UnknownHiker

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];
      };
    };
  };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions