From 0cb2bea7e754cdc9570bdb71b167fe9df9176f08 Mon Sep 17 00:00:00 2001 From: Xevion Date: Thu, 7 Nov 2024 19:05:48 -0600 Subject: [PATCH] Simplify privateDomain to promptString in config TOML --- .ignored_keys/privateDomain.age | 1 - home/.chezmoi.toml.tmpl | 1 + home/.chezmoiignore | 1 - home/.chezmoitemplates/keys.tmpl | 6 ------ home/.chezmoitemplates/scripts/commonrc.sh.tmpl | 2 +- home/.ignored_keys/privateDomain.age | 0 home/run_onchange_install-packages.sh.tmpl | 2 +- 7 files changed, 3 insertions(+), 10 deletions(-) delete mode 100644 .ignored_keys/privateDomain.age delete mode 100644 home/.chezmoitemplates/keys.tmpl delete mode 100644 home/.ignored_keys/privateDomain.age diff --git a/.ignored_keys/privateDomain.age b/.ignored_keys/privateDomain.age deleted file mode 100644 index 0819b04..0000000 --- a/.ignored_keys/privateDomain.age +++ /dev/null @@ -1 +0,0 @@ -***REMOVED*** diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index 68fb2e8..5fd8f15 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -41,6 +41,7 @@ args = [ ] [data] + privateDomain = "{{ promptString "Enter the private domain" }}" chassis = "{{ $chassisType }}" wsl = {{ $wsl }} diff --git a/home/.chezmoiignore b/home/.chezmoiignore index f138cad..e69de29 100644 --- a/home/.chezmoiignore +++ b/home/.chezmoiignore @@ -1 +0,0 @@ -.ignored_keys \ No newline at end of file diff --git a/home/.chezmoitemplates/keys.tmpl b/home/.chezmoitemplates/keys.tmpl deleted file mode 100644 index db9e502..0000000 --- a/home/.chezmoitemplates/keys.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{- if false -}} -This is just a comments block, because apparently the templating langauge doesn't have a proper way to comment code as far as I can tell. -This file is just a template for loading keys from the .ignored_keys directory. -{{- else if eq . "privateDomain" -}} -***REMOVED*** -{{- end -}} \ No newline at end of file diff --git a/home/.chezmoitemplates/scripts/commonrc.sh.tmpl b/home/.chezmoitemplates/scripts/commonrc.sh.tmpl index 05e1128..9f68efa 100644 --- a/home/.chezmoitemplates/scripts/commonrc.sh.tmpl +++ b/home/.chezmoitemplates/scripts/commonrc.sh.tmpl @@ -10,7 +10,7 @@ export TERM=xterm-256color # fixes terminal colors when ssh'ing into laptop export OPENAI_API_KEY="{{ (rbw "OpenAI - chatgpt-cli Key").data.password }}" # hishtory -export HISHTORY_SERVER="https://hsh.{{ template "keys.tmpl" "privateDomain" }}" +export HISHTORY_SERVER="https://hsh.{{ .privateDomain }}" export PATH="$PATH:$HOME/.hishtory" {{ if eq .shell "zsh" -}} source $HOME/.hishtory/config.zsh diff --git a/home/.ignored_keys/privateDomain.age b/home/.ignored_keys/privateDomain.age deleted file mode 100644 index e69de29..0000000 diff --git a/home/run_onchange_install-packages.sh.tmpl b/home/run_onchange_install-packages.sh.tmpl index cbab70f..3ceb4aa 100644 --- a/home/run_onchange_install-packages.sh.tmpl +++ b/home/run_onchange_install-packages.sh.tmpl @@ -47,7 +47,7 @@ fi # Install hishtory if ! type -P hishtory; then echo "chezmoi: Installing hishtory" - export HISHTORY_SERVER="https://hsh.{{ template "keys.tmpl" "privateDomain" }}" + export HISHTORY_SERVER="https://hsh.{{ .privateDomain }}" export HISHTORY_SKIP_INIT_IMPORT='true' curl https://hishtory.dev/install.py | python3 - --offline --skip-config-modification fi