<aterius>
This might be a convoluted question, but is there a way to do a more templating based approach to shell files (like zshrc) where I source the text file but also do substitutions for thinks like ${pkgs.openssh}/bin/ssh-keygen}?
<aterius>
My issue is I need the powerlevel10k instant prompt at the very top of the file
<aterius>
Yet I also need to source my home-manager vars before calls out to things like z-lua and fzf
<aterius>
I could write it entirely with string concatenation in nix, but then my config becomes less portable to non-nixos systems
<dash>
Why's that make it less portable?
<__monty__>
You can drop a .zshrc anywhere and it'll work. Can't do the same with a convoluted nix string concatenation without nix.
<dash>
Sure but why would you try to use zsh without nix
<__monty__>
Simply wanting to be able to share your dotfiles is sufficient reason imo. I don't see why you'd make it unnecessarily dependent on nix.
<energizer>
i have a ~/.zshrc without reference to nix and a ~/.config/zsh/.zshrc that uses nix and sources ~/.zshrc
<aterius>
I do the same, but there are a few issues
<energizer>
what issues?
<aterius>
Right now I have to either A) Accept home-manager adding things to the beginning/end of my zshrc which means I have some repetition
<aterius>
B) not use any nix store dependent paths in my zshrc
<aterius>
I found one example where someone substituted string in a sourced file using a substitute.nix
<aterius>
I have to use initExtraBeforeCompinit, because I need a certain command to run at the beginning of my zshrc
<infinisil>
We really need more DAGs!
<aterius>
As a consequence, my entire zshrc runs before reaching the line . "/home/mjlbach/.nix-profile/etc/profile.d/hm-session-vars.sh" added by home-manager
<aterius>
* As a consequence, my entire zshrc runs before reaching the line . `"/home/mjlbach/.nix-profile/etc/profile.d/hm-session-vars.sh"` added by home-manager
<aterius>
So I have to manually add that in my sourced zshrc at the top, such that things managed by nix are present in my path
<aterius>
Furthermore, home-manager adds a lot of settings by default (like HISTORY) which I've already defined in my zshrc