I do not see anything HM related there.
I.e., share the full flake.nix, as well as any other code between flake.nix and home.nix. If you have secrets in those files, just redact them.
My money is on you accidentally using the home-manager command with channels, rather than a NixOS module setup; unfortunately the home-manager docs are quite counterintuitive.
Ok thanks guys, there is my flake.nix :
{
description = "Heuzef NixOS-Config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-search-cli = {
url = "github:peterldowns/nix-search-cli";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, nix-search-cli }:
let
system = "x86_64-linux";
lib = nixpkgs.lib;
in {
nixosConfigurations = {
pgmr = lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
./steam.nix
./hardware/pgmr.nix
./hardware/printers.nix
home-manager.nixosModules.home-manager
{
networking.hostName = "pgmr";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.heuzef = import ./home.nix;
}
];
};
};
};
}
That looks correct. What about nix-env -Q and nix profile list?
btw, the way i haved install HM :
# Install home-manager
sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz home-manager
sudo nix-channel --update
nix-shell '<home-manager>' -A install
# Install nix-search
nix profile install github:peterldowns/nix-search-cli --refresh --extra-experimental-features nix-command --extra-experimental-features flakes
Doesnât using nix profile break usage of nix-env?
Yeah, thatâll be the issue. You most likely have two separate home-manager installations, one of which uses your channels, and the other is installed with your system flake.
It seems that the home-manager that you imperatively installed is taking precedence over the one installed with your system flake. Figure out how to uninstall the latter; I think the home-manager command (which you most likely have installed) has a command for that.
Well done if you find the problem guys ![]()
I follow the official way : Home Manager Manual. So why itâs better to keep my flake configuration instead of this one ?
You read the instructions wrong, though to be fair, most new users do. You need to either manage Home Manager with your NixOS config or manage it independently. Do not do both like you did.
There are two headings under installing: Standalone installation and NixOS module. Pick one and donât use the other one.
