As I’m trying to move my config over to home-manager step by step, I realised a few days ago, that when I have some shell plugin which provides an “entrypoint” which is meant to be sourced into the shell, then I have no clue how to actually find that entrypoint without doing some very hefty extra lifting…
Add another file into a special folder of my setup which gets sourced automatically from my .zshrc which always follows the pattern if which $script 2>&1 >/dev/null; then eval $($scrip); fi
Is there some simpler way to find the installation path of the first derivation, such that I can reduce the indirections and just source from the first path without that much of clutter?
HM uses the NixOS modules library so the Writing NixOS Modules section applies. You can look at existing modules in HM for inspiration, the programs.feh module is nice and simple.
The module is picked up and seen, though I can’t use it, as it seems to not use “my” pkgs but the “systems”, wothout the overlays I specified declaritively in my home-manager config.
That sounds a bit odd. If you use the pkgs argument that is given to the module then it should be extended by the overlays you have specified in Home Manager’s nixpkgs.overlays option. Note, any overlays you have in ~/.config/nixpkgs/config.nix or ~/.config/nixpkgs/overlays will be ignored inside the HM configuration.
I created a pkgs in another file and assumed it would be used everywhere. I already learnt that this is not true, and even more sad, that there seems no way to pin down the nixpkgs to a certain commit via home-manager as well…
In a perfect world, there were no need to do nix-channels --update anymore, but instead bump the commit-sha and checksum in the sources.json. More tedious for sure, but reproducable between machines.
After I learned that this won’t work, I just used nixpkgs.overlays for now, and it worked exactly once, then I updated the channels and since then I have the problem described and discussed in Home-Manager doesn't work anymore after `nix-channels --update`