I am new to Nix. My question is how to set up Tmux in Alacritty with a username independent approach. I put Alacritty configuration in alacrity.nix and import it to home.nix. In Alacritty.nix, I write the following to set up tmux
where tmux locates in /etc/profiles/per-user/ricky/bin/tmux. The path of tmux is obtained from running whereis tmux inside terminal. In fact, this configuration works but the location of tmux is too specific for username = ricky. Imagine that I set up Alacritty based on this file in my new Mac and the username of the Mac is username = ricky-dev. If I run darwin-rebuild switch to config this new Mac, Alacritty will crash since /etc/profiles/per-user/ricky/bin/tmux is not the correct path of tmux in my new Mac now. Is it possible to avoid such “Path/ username dependent” approach to configure tmux inside Alacritty? Thank you.
You should note that interpolation won’t automatically add tmux to the store, so you’d still need to install it (which is what you’re doing in tmux.nix, I assume).