Replies: 3 comments 1 reply
-
Not sure if this is the only approach, but seems to me you want to preserve the contendt of the If that's the goal, one approach can be to maintain a |
Beta Was this translation helpful? Give feedback.
-
There's currently no way to do this elegantly. I would recommend using a
Where This should be a Longer term, #2273 will be the eventual elegant solution. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your suggestions and examples. To give a more complete example, let's say I have more than one file:
Combining both of your answers I thought of a script like this: run_after_configure-steam-controllers.tmpl #!/bin/bash
# Create a symlink from folder with placeholder name to the actual account ID for steam
ln -sf "__steamAccountID" "$HOME/.local/share/Steam/{{ .steamAccountID }}"
# Create symlinks for files with placeholders in their names in the same directory
ln -sf "preferences__controllerSerialNumber.vdf" \
"$HOME/.local/share/Steam/{{ .steamAccountID }}/preferences_{{ .controllerSerialNumber}.vdf" So I let Chezmoi copy the folder and all its files with a placeholder name on the same level in the folder hierarchy. Then I create a symbolic link with the proper name that the application expects, and then I create symbolic links for individual files where necessary. It's semi-elegant, or just good enough. I spent some more time catching up with the changes in documentation and some discussions here. I read that symbolic links for folders are not read in the source state for technical reasons and security, but on the targets this should be fine? Or will I run into some other issues of Chezmoi? |
Beta Was this translation helpful? Give feedback.
-
Hello, I would like to include a file like the following into my dotfiles:
${steam_account_id}
is a large number${controller_serial_number}
is an alphanumerical stringAfter checking the documentation and threads like #3333 and #1226 it is not clear to me how to do it. I'd prefer a simple way like having
steam_account_id
andcontroller_serial_number
in my chezmoi data section and use a paths with variables like above.Beta Was this translation helpful? Give feedback.
All reactions