chezmoi: windows local/share symlink

This commit is contained in:
dogeystamp 2024-08-15 17:31:30 -04:00
parent 08358acd6e
commit ac75ffa85f
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -1,7 +1,8 @@
{{- /* symlink into ~/.config on windows */ -}}
{{- /* symlink into ~/.config and ~/.local/share/ on windows */ -}}
{{- $roamingconfdirs := list "alacritty" "nushell" -}}
{{- $localconfdirs := list "nvim" -}}
{{- $localdatadirs := list "nvim-data" -}}
{{- if eq .chezmoi.os "windows" -}}
$userdir = ([Environment]::GetFolderPath("UserProfile"))
@ -20,4 +21,10 @@ If (-Not (Test-Path $localconfdir\{{ . }})) {
}
{{ end }}
{{ range $localdatadirs }}
If (-Not (Test-Path $localconfdir\{{ . }})) {
New-Item -Path $localconfdir\{{ . }} -ItemType Junction -Value $userdir\.local\share\{{ . }}
}
{{ end }}
{{- end -}}