OS: macOS, 13.2.1 (Ventura)
Nix: 2.12.0
Home-Manager: 22.11
(If I’ve poorly titled the question, please say, and I’ll edit it.)
I’ve installed asdf-vm
via git
because it’s not available for x86_64-darwin
, and having zsh
installed via home-manager
, I want to do the following as per the installation instructions at Install asdf > ZSH & Git:
Add the following to
~/.zshrc
:
. “$HOME/.asdf/asdf.sh”
I’ve changed this to
. "${ASDF_DIR}/asdf.sh"
based on my env variables in my /etc/zshenv
(with the goal of moving my dotfiles into ~/.config
eg ~/.config/asdf
).
My dir/file setup is:
/etc/zshenv <-- export ASDF_DIR="${XDG_CONFIG_HOME}/asdf
~/.config/nixpkgs/flake.nix <-- home manager
~/.config/nixpkgs/home_manager/modules/shell/zsh.nix <-- initExtra
To do the above, I’m attempting the following in my home_manager/modules/shell/zsh.nix
:
initExtra = "
. "${ASDF_DIR}/asdf.sh";
"
which gives:
error: syntax error, unexpected DOLLAR_CURLY, expecting ';'
Is this because I am not using substituteAll
and if so, how do I use it so ${ASDF_DIR}
is substituted, and am I putting . "${ASDF_DIR}/asdf.sh"
in the right block in my zsh.nix
file imported into my home-manager flake?