-
Notifications
You must be signed in to change notification settings - Fork 111
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
Home manager does not install or build with config (reproducer included) #13
Comments
Hi, here nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.jdoe = import ./home.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
}
];
};
}; What is discussed in #12 is that apparently a According to the $ nix build --no-link <flake-uri>#homeConfigurations.jdoe.activationPackage
$ "$(nix path-info <flake-uri>#homeConfigurations.jdoe.activationPackage)"/activate Then The manual seems to say that from Before that, my shell was trying to source |
@DavSanchez is correct, this template provides a standalone home-manager config. As they showed, it's pretty simple to use it as a NixOS module instead, if you prefer. I would add, however, that getting the |
Thank you both for your help. Your answers make sense but leave me with some questions. Doesn't using home-manager as a nixos module subsume the standalone home-manager case? Plus it would seem to avoid the user not having home-manager like I did. Are there downsides to using the home-manager module? |
The main one is just that you need to rebuild the system (including using The home-manager nixos module pretty much just creates a user systemd unit that calls the hm activation script, so they're not really incompatible. That means you can even combine the two, e.g. include your home config into your nixos system config, and iterate on it with |
My understanding is that this config is using home-manager as a nixos module. So whenever you do
nixos-rebuild switch
ornixos-rebuild vm
the home-manage configuration should ge run too.That doesn't happen though, and you can reproduce locally with:
related to #12. After reading #12 I thought "Oh... maybe the home-manager binary is available even though the home-manager nixos module wasn't run".
However
home-manager
in the shell after logging in returnshome-manager: command not found
.The text was updated successfully, but these errors were encountered: