Hi all, i’m a nix newb just starting out with nix-darwin & home manager. I’m adding home manager like this:
# home manager
home-manager.darwinModules.home-manager
{
users.users.${username}.home = "/Users/${username}";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = specialArgs;
home-manager.users.${username} = import ./home;
}
and within ./home i have a file with imports like this:
{ pkgs, username, useremail, hostname, ... }:
{
# import sub modules
imports = [
./git.nix
./packages.nix
./wezterm.nix
#./zsh.nix
];
# Home Manager needs a bit of information about you and the
# paths it should manage.
home = {
username = username;
homeDirectory = "/Users/${username}";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
stateVersion = "24.05";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
but when i add a file here i always get an error like below. I’m confused because some of them work but others it can’t find. How can i fix that?
To rebuild i’m running the command darwin-rebuild switch --flake .
.
error: path '/nix/store/g33gywqamiwjyjc34p5w55vwnv4vkxj1-source/home/packages.nix' does not exist
Thanks!