diff options
author | Martin Fischer <martin@push-f.com> | 2024-12-27 08:45:34 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2024-12-27 18:44:37 +0100 |
commit | 1b65ba7a838e422c9bf16ddcaf796a996fa51b6b (patch) | |
tree | d8ec8d965f955a7f9a5c2b5c98e8a430fb0e8b6f /user | |
parent | edda7ef46bf2ae7fde9511005b4e7d40648c7e24 (diff) |
refactor: introduce profiles
Diffstat (limited to 'user')
-rw-r--r-- | user/zsh/.zshrc | 9 | ||||
-rw-r--r-- | user/zsh/zshrc-dev.sh | 11 | ||||
-rw-r--r-- | user/zsh/zshrc-workstation.sh (renamed from user/zsh/zshrc-graphical.sh) | 12 |
3 files changed, 14 insertions, 18 deletions
diff --git a/user/zsh/.zshrc b/user/zsh/.zshrc index a579784..4285c99 100644 --- a/user/zsh/.zshrc +++ b/user/zsh/.zshrc @@ -62,10 +62,7 @@ autoload -Uz compinit [ -d "$XDG_CACHE_HOME"/zsh ] || mkdir -p "$XDG_CACHE_HOME"/zsh compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-$ZSH_VERSION -# Environment-specifics -if [ -n "$MYNIX_DEV" ]; then - source "$ZDOTDIR/zshrc-dev.sh" -fi -if [ -n "$MYNIX_GRAPHICAL" ]; then - source "$ZDOTDIR/zshrc-graphical.sh" +# Profile-specifics +if [ "$MYNIX_PROFILE" = "workstation" ]; then + source "$ZDOTDIR/zshrc-workstation.sh" fi diff --git a/user/zsh/zshrc-dev.sh b/user/zsh/zshrc-dev.sh deleted file mode 100644 index 484007d..0000000 --- a/user/zsh/zshrc-dev.sh +++ /dev/null @@ -1,11 +0,0 @@ -# This file is sourced by .zshrc if parts/dev.nix was imported. - -## Aliases -alias code='codium' -alias tokei='tokei -s code -n commas' - -## Environment variables -export NPM_CONFIG_PREFIX="$HOME/.local/npm" - -path+=~/.cargo/bin -path+=($NPM_CONFIG_PREFIX/bin) diff --git a/user/zsh/zshrc-graphical.sh b/user/zsh/zshrc-workstation.sh index 1e9bed7..04f9c88 100644 --- a/user/zsh/zshrc-graphical.sh +++ b/user/zsh/zshrc-workstation.sh @@ -1,4 +1,14 @@ -# This file is sourced by .zshrc if parts/graphical.nix was imported. +# This file is sourced by .zshrc if profiles/workstation was imported. + +## Aliases +alias code='codium' +alias tokei='tokei -s code -n commas' + +## Environment variables +export NPM_CONFIG_PREFIX="$HOME/.local/npm" + +path+=~/.cargo/bin +path+=($NPM_CONFIG_PREFIX/bin) function ssh() { # In my ~/.ssh/config I configure host-specific background colors, for example: |