From 0a729ea82188e2cf21d956739425511c11aaf568 Mon Sep 17 00:00:00 2001 From: Steve Beaulac Date: Tue, 21 Jul 2026 10:49:58 -0400 Subject: [PATCH] refactor(env): template environment.d config and update fish aliases Replace hardcoded config/environment.d/generic.conf with a Tera template (environments.tmpl) rendered via mise, pulling DOTFILES_DIR, THEME_DIR, SECOND_BRAIN, and user info from mise.toml vars. - Add SECOND_BRAIN variable in mise.toml for the vault path - Update fish aliases to use $SECOND_BRAIN instead of a hardcoded path - Fix Obsidian nvim aliases with proper quoting - Remove stale dotfiles.conf template reference --- config/environment.d/generic.conf | 2 -- config/fish/config.fish | 6 +++--- mise.toml | 4 ++-- templates/environments.tmpl | 8 ++++++++ 4 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 config/environment.d/generic.conf create mode 100644 templates/environments.tmpl diff --git a/config/environment.d/generic.conf b/config/environment.d/generic.conf deleted file mode 100644 index 54b1bca..0000000 --- a/config/environment.d/generic.conf +++ /dev/null @@ -1,2 +0,0 @@ -TERM=xterm-256color -npm_config_prefix=$HOME/.local diff --git a/config/fish/config.fish b/config/fish/config.fish index 6ba081b..9d49dc6 100644 --- a/config/fish/config.fish +++ b/config/fish/config.fish @@ -51,9 +51,9 @@ if status is-interactive if command -q nvim set -gx EDITOR nvim - alias oo="cd ~/Documents/nca-notes/" - alias on="nvim +Obsidian new" - alias os="nvim +Obsidian search" + alias oo="cd $SECOND_BRAIN" + alias on="nvim '+Obsidian new'" + alias os="nvim '+Obsidian search'" alias mini="NVIM_APPNAME=mini.nvim nvim" end diff --git a/mise.toml b/mise.toml index d585ba9..53aebde 100644 --- a/mise.toml +++ b/mise.toml @@ -3,6 +3,7 @@ USER_FULLNAME = "Steve Beaulac" USER_EMAIL = "steve@beaulac.me" DOTFILES_DIR = "{{config_root}}" THEME_DIR = "~/.config/omarchy/current/theme" +SECOND_BRAIN = "~/Documents/sjv-brain" [env] DOTFILES_DIR = "{{config_root}}" @@ -15,9 +16,8 @@ dotfiles.default_mode = "symlink-each" "~/.config/btop" = "config/btop" "~/.config/btop/themes/current.theme" = { source = "~/.config/omarchy/current/theme/btop.theme", mode = "symlink" } "~/.config/emacs" = "config/emacs" -"~/.config/environment.d" = "config/environment.d" +"~/.config/environment.d/generic.conf" = { source = "templates/environments.tmpl", mode = "template", template = "tera" } "~/.gnupg" = "config/gnupg" -"~/.config/environment.d/dotfiles.conf" = { source = "templates/dofiles.conf.tmpl", template = "tera", mode = "template" } "~/.config/fish" = "config/fish" # check if we really need the fisher plugins "~/.config/gdb" = "config/gdb" "~/.config/ghostty" = "config/ghostty" diff --git a/templates/environments.tmpl b/templates/environments.tmpl new file mode 100644 index 0000000..798068b --- /dev/null +++ b/templates/environments.tmpl @@ -0,0 +1,8 @@ +TERM=xterm-256color +npm_config_prefix=$HOME/.local + +DOTFILES_DIR = "{{ vars.DOTFILES_DIR }}" +USER_FULLNAME = "{{ vars.USER_FULLNAME }}" +USER_EMAIL = "{{ vars.USER_FULLNAME }}" +THEME_DIR = "{{ vars.THEME_DIR }}" +SECOND_BRAIN = "{{ vars.SECOND_BRAIN }}"