You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was following this nice starter config and was especially interested in the ability to define local packages under pkgs/. However I can't get home-manager build succeed because it always complains about my local package being unknown.
I was having this same problem and found a post from @Misterio77 in another issue. TLDR: in my configuration/home files, I added nixpkgs.overlays. = [ outputs.overlays.additions ]; and was then able to import my custom packages.
# local packages
inputs.self.packages.${system}.mypkg
instead of simply:
mypkg
Doing it like you did in your config as suggested in the three places will lead to the error message error: attribute 'outputs' missing in my case. Which I think lead me into the rabbit hole to get this working in the first place.
Anyway despite me having gotten it to work it would still be nice to have a working example demonstrated here in the nix-starter-config.
I think this is the challenge of nix that there are always multiple ways to get something done and for beginners this can cause some (nix) anxiety ;-)
I was following this nice starter config and was especially interested in the ability to define local packages under
pkgs/
. However I can't gethome-manager build
succeed because it always complains about my local package being unknown.Example:
I have my package defined under:
with all the other configuration taken from the standard example simply adding
home.packages = with pkgs; [ mypkg ];
as suggested innix-starter-configs/standard/home-manager/home.nix
Line 58 in 972935c
is not enough since home-manger build will complain with
error: undefined variable 'mypkg'
Doing a
nix build .#mypkg
works fine though.So how should one add the
mypkg
in order that it will be found byhome-manager build
?The text was updated successfully, but these errors were encountered: