Today I needed a simple lightweight way to interpolate environment variables into a template without installing heavyweight dependencies (CI/CD) and I remembered envsubst (only 1.45 MiB expanded in Nix)!
echo "Hello user ${USER} in ${HOME}. It's time to say ${HELLO}!" > welcome.tmpl
env HELLO="willkommen" envsubst < welcome.tmpl
Hello user xxxx in /home/xxxx. It's time to say willkommen!