You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am synchronising dot files between some Linux machines and two Macs.
I would like to add my VS Code config files, but under Linux they are located in ~/.config/ while under macOS they are in ~/Library/Application Support.
What is the simplest way to synchronise these files via chezmoi?
It feels a little bit cumbersome though to have the need for the .chezmoiignore snippet:
{{ if ne .chezmoi.os "darwin" }}
Library/Application Support/App/file.conf
{{ end }}
{{ if ne .chezmoi.os "linux" }}
.config/app/file.conf
{{ end }}
You might want the ne "darwin" side to simply be Library or Library/, because you don't need the Library/ directory in Linux. or Windows. With respect to the ne "linux" side, that logic could be placed entirely in .config/app/file.conf:
{{- if eq .chezmoi.os "linux" }}{{ template "app.conf.common.tmpl" . }}{{ end -}}
If chezmoi detects an empty file and it does not have the empty_ attribute, the file will not be created.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am synchronising dot files between some Linux machines and two Macs.
I would like to add my VS Code config files, but under Linux they are located in
~/.config/
while under macOS they are in~/Library/Application Support
.What is the simplest way to synchronise these files via chezmoi?
Many thanks for any pointers!
Beta Was this translation helpful? Give feedback.
All reactions