-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Add copy target type #77
Comments
This does seem pretty important to support to me. I'm debating whether it should be a new type or if it's enough for the template type to fallback to copying on non-utf files... I'm leaning towards the latter, but I need to check which would make more sense in the context of the code. PR appreciated :D |
I think it would make more sense semantically for it to be a new type as it doesn't really make sense to template non-text files (e.g. binaries, media, etc.). Relying on a fallback to copy feels more like a hacky approach, and may not be intuitive to users. There's also an opportunity for a performance benefit. If I have some non-templated text files that I want to copy somewhere as is, I could specify the target type as I'd be happy to write up a PR! Though I'm quite limited on time so no guarantees. |
Good points and I agree. Also, the error message for non-utf templates could hint you to use copy instead. |
Until this happens can there be a warning when the target is outside $HOME. |
Is your feature request related to a problem? Please describe.
I am configuring a theme for SDDM (an X display manager) that requires an image file to be placed somewhere in
/usr/share/sddm/themes/
, so privilege escalation is required.My dotfiles folder is located in my home directory, so it is not ideal to use a symlink because firstly, it is a security risk; and secondly, it doesn't really make sense for a system-wide configuration file to symlink to a user file.
Furthermore, my home directory is encrypted using
fscrypt
, and is only unlocked after logging in, so using a symlink wouldnt't work.Using the
template
target type allows us to copy text files, but for non-text files, we getstream did not contain valid UTF-8
as the file stream is interpreted as UTF-8.Describe the solution you'd like
A new
copy
target type that can be specified when configuring a complex target:I think this would be useful in conjunction with the
owner
field and for other scenarios in which symlinks aren't desirable.Describe alternatives you've considered
I've tried:
template
target type, but as mentioned above, this won't work for non-text filesdotter
as root, which also works, but ideally I would like to have all my dotfiles in one locationAdditional context
The text was updated successfully, but these errors were encountered: