How can I reference the user's home directory in configuration.nix?

I need to reference the ~/.config/MangoHud/MangoHud.conf file for my MangoHud settings, but it only works with an absolute path it seems. ~/.config/MangoHud/MangoHud.conf Does not work but ~/home/myUser/.config/MangoHud/MangoHud.conf does.

${HOME} does not seem to work. Is there any way to do this?

"${config.users.users.myUser.home}/.config/MangoHud/MangoHud.conf" sounds like it is what you want

3 Likes