From 4cda063305ea743f7ce5ba3ef6617273a3c77eed Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Wed, 14 Aug 2024 23:46:14 +0300 Subject: [PATCH] chore(config): exports now loaded from .config --- config/exports | 10 ++++++++++ local/bin/x-load-configs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/exports b/config/exports index a15e8be..dfb3289 100755 --- a/config/exports +++ b/config/exports @@ -459,3 +459,13 @@ msg "Setting up miscellaneous configuration" export CHEAT_USE_FZF=true export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history" +X_EXPORTS_FILES=( + "$HOME/.config/exports-secret" + "$HOME/.config/exports-$(hostname)" + "$HOME/.config/exports-$(hostname)-secret" +) +for exportFile in "${X_EXPORTS_FILES[@]}"; do + [ -f "$exportFile" ] && source "$exportFile" && msg "Sourced $exportFile" +done +unset X_EXPORTS_FILES + diff --git a/local/bin/x-load-configs b/local/bin/x-load-configs index 9f7577e..e193e67 100755 --- a/local/bin/x-load-configs +++ b/local/bin/x-load-configs @@ -17,7 +17,7 @@ CONFIG_HOST="$(hostname -s)" # Enable debugging if requested [ "$DEBUG" = "1" ] && set -x -CONFIG_PATH="${DOTFILES}/config" +CONFIG_PATH="${HOME}/.config" [ -d "$DOTFILES" ] || { msg_err "Error: DOTFILES is not set or $DOTFILES does not exist"