-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.chezmoi.yaml.tmpl
45 lines (41 loc) · 1.28 KB
/
.chezmoi.yaml.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{{- $sshSession := not (empty (or (env "SSH_CLIENT") (env "SSH_TTY"))) -}}
{{- $osID := .chezmoi.os -}}
{{- if (eq .chezmoi.os "linux") -}}
{{- if (hasKey .chezmoi.osRelease "idLike") -}}
{{- $osID = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.idLike -}}
{{- else if (hasKey .chezmoi.osRelease "id") -}}
{{- $osID = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}}
{{- else if (output "uname" "-a" | contains "synology") -}}
{{- $osID = "linux-synology" -}}
{{- end -}}
{{- end -}}
{{- $basePath := "/usr" -}}
{{- if (eq .chezmoi.os "darwin") -}}
{{- $basePath = (output "brew" "--prefix" | trim) -}}
{{- else if (eq $osID "linux-synology") -}}
{{- $basePath = "/opt" -}}
{{- end -}}
{{- $nanocrPath := printf "%s/share/nano" $basePath -}}
{{- if (eq $osID "linux-arch") -}}
{{- $nanocrPath = "/usr/share/nano-syntax-highlighting" -}}
{{- end -}}
{{- $ytdlpDownloadPath := "~/Downloads" -}}
{{- if (eq $osID "linux-synology") -}}
{{- $ytdlpDownloadPath = "/volume1/Media/Downloads" -}}
{{- end -}}
---
data:
osid: {{ $osID }}
base_path: {{ $basePath }}
ssh_session: {{ $sshSession }}
home_wifi_ssids:
- ubiquiti
- up|link
apps:
git:
name: ""
email: ""
nano:
nanorc_path: {{ $nanocrPath }}
yt_dlp:
download_path: {{ $ytdlpDownloadPath }}