Open kergoth opened 10 months ago
The biggest issue with this approach is ensuring the availability of the tools which are installed in the home directory at the time of chezmoi application. They can be installed in a before_
script, but we may well need certain config files to be installed before they can be installed, such as is the case with nix home manager. I don't believe chezmoi's locks allow for a before_
script to partially apply a chezmoi config, but there's potential to leverage chemzoi execute-template
for this in the before_
script instead.
See Optimizing Shell Startup Time, the main idea being to call out to them in templates, such as
{{ output "/opt/homebrew/bin/brew" "shellenv" | trim }}
. There are items to confirm when looking into this approach. We'd have to ensure that changes to the packages result in changing the template, and package installation would have to be done with abefore
script to ensure they're available for the templates to use. They would also have to not depend on my userPATH
changes.