Fix using vars

This commit is contained in:
aloslider
2026-04-22 18:40:04 +03:00
parent 09b96075de
commit 35c544038c
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -2,9 +2,9 @@ encryption = "age"
[age] [age]
{{ if eq .chezmoi.osRelease.id "nixos" }} {{ if eq .chezmoi.osRelease.id "nixos" }}
identity = "{{ .vars.nixosAgeKeyPath }}" identity = "{{ .nixosAgeKeyPath }}"
{{ else }} {{ else }}
identity = "{{ .vars.defaultAgeKeyPath }}" identity = "{{ .defaultAgeKeyPath }}"
{{ end }} {{ end }}
recipient = "age1tl5hp6v0t38fl8gxuqds40z503mwz885ev22au4jdy5r24aak3zsza23sx" recipient = "age1tl5hp6v0t38fl8gxuqds40z503mwz885ev22au4jdy5r24aak3zsza23sx"
@@ -7,10 +7,10 @@ set -euo pipefail
echo "Setting up age key..." echo "Setting up age key..."
KEY_FILE="{{ .vars.defaultAgeKeyPath }}" KEY_FILE="{{ .defaultAgeKeyPath }}"
KEY_DIR="$(dirname "$KEY_FILE")" KEY_DIR="$(dirname "$KEY_FILE")"
{{ if .vars.skipCreatingAgeKey }} {{ if .skipCreatingAgeKey }}
echo "Expecting age key to be at $KEY_FILE" echo "Expecting age key to be at $KEY_FILE"
exit 0 exit 0
{{ end }} {{ end }}