diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl index b929770..aa28c91 100644 --- a/.chezmoi.yaml.tmpl +++ b/.chezmoi.yaml.tmpl @@ -2,7 +2,7 @@ {{- $recipient := "" -}} {{- $fullname := "" -}} {{- if stdinIsATTY -}} -{{- # we are in interactive mode -}} +{{/* we are in interactive mode */}} {{- $email := promptStringOnce . "email" "Email address" -}} {{- $recipient := promptStringOnce . "recipient" "GPG recipient" -}} {{- $fullname := promptStringOnce . "fullname" "Full name" -}} @@ -12,9 +12,9 @@ {{- $fullname = "User" -}} {{- end -}} -{{ if $REMOTE_CONTAINERS -}} -{{- # in devcontainer predefined source is home/dotfiles -}} -sourceDir: {{ joinPath $HOME "dotfiles" }} +{{ if not ( env "REMOTE_CONTAINERS" | empty ) -}} +{{/* # in devcontainer predefined source is home/dotfiles */}} +sourceDir: {{ joinPath env "HOME" "dotfiles" }} {{- end -}} encryption: "gpg" diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index f45f4dd..a1c1b8c 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -1,5 +1,5 @@ -{{ if not $REMOTE_CONTAINERS -}} -{{ # we do not manage git in devcontainers -}} +{{ if not ( env "REMOTE_CONTAINERS" | empty ) -}} +{{/* we do not manage git in devcontainers */}} [user] name = {{ .fullname }} email = {{ .email }} diff --git a/dot_gitignore_global.tmpl b/dot_gitignore_global.tmpl index 70859b2..6bff1eb 100644 --- a/dot_gitignore_global.tmpl +++ b/dot_gitignore_global.tmpl @@ -1,5 +1,5 @@ -{{ if not $REMOTE_CONTAINERS -}} -{{ # we do not manage git in devcontainers -}} +{{ if not ( env "REMOTE_CONTAINERS" | empty ) -}} +{{/* we do not manage git in devcontainers */}} .env .DS_Store {{ end -}}