Skip to content
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

Add a mechanism for adding host-specific files #12

Closed
twpayne opened this issue Nov 20, 2018 · 0 comments
Closed

Add a mechanism for adding host-specific files #12

twpayne opened this issue Nov 20, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@twpayne
Copy link
Owner

twpayne commented Nov 20, 2018

Currently chezmoi will populate all files. It is likely that some files will only be required on certain machines. For example, you may need ~/company.conf on your work machine, but this file should not exist on your home machine. At the moment, you can make ~/company.conf empty on your home machine using a template:

{{- if .chezmoi.hostname eq "work-laptop" }}
# contents of company.conf
{{- end -}}

but this will still result in an empty file on other machines. We need a mechanism to only populate files that should be present.

For config files. an empty file is more-or-less equivalent to an absent file. Perhaps we can use this.

@twpayne twpayne added the enhancement New feature or request label Nov 20, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant