cleaning up hostname handling
This commit is contained in:
parent
25931051a8
commit
cb39989568
6 changed files with 36 additions and 11 deletions
|
@ -2,3 +2,11 @@ encryption = "age"
|
|||
[age]
|
||||
identity = "~/.key.txt"
|
||||
recipient = "age1yd87u4ae86erpem2tynyl959ppc8a3jt4ztssykytzaklut6uvus5prt2t"
|
||||
|
||||
{{- $hostname = .chezmoi.hostname -}}
|
||||
{{- if eq .chezmoi.os "darwin" -}}
|
||||
{{- $hostname := output "scutil" "--get" "ComputerName" | trim -}}
|
||||
{{- end -}}
|
||||
|
||||
[data]
|
||||
hostname = {{ $hostname | quote }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue