From e24043a06675a6fedcccc775fe3d285e0bf3a4b1 Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 21 Mar 2026 19:21:15 +0100 Subject: fix(zsh): add robustness checks and platform-specific aliases; add SSH key --- modules/home/zsh.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules/home/zsh.nix') diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index 1b24133..50a3fcf 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -61,7 +61,7 @@ fi done - eval "$(twm --print-zsh-completion)" + command -v twm &>/dev/null && eval "$(twm --print-zsh-completion)" bindkey '^I^I' autosuggest-accept ''; @@ -75,13 +75,17 @@ alias git-clean-branches="git for-each-ref --format '%(refname:short)' refs/heads | grep -v 'master\|main' | xargs git branch -D" alias :q='exit' alias ls='ls --color' + '' + (if pkgs.stdenv.isDarwin then '' alias tailscale='/Applications/Tailscale.app/Contents/MacOS/Tailscale' + '' else "") + '' # Generic / Random / Utility alias rg="rg --hidden --glob '!.git' --glob '!node_modules'" alias r='cd $REPOS/github.com/' alias c='clear' + '' + (if pkgs.stdenv.isDarwin then '' alias afk='pmset displaysleepnow' + '' else "") + '' alias dl="cd ~/Downloads" alias l='ls -l' alias todo='nt' @@ -91,7 +95,7 @@ alias tre="tree -I '.git|node_modules'" alias timeliste="open 'https://tripletex.no/execute/updateHourlist?contextId=11208568'" alias t="open 'https://tripletex.no/execute/updateHourlist?contextId=11208568'" - alias fork-cleaner="fork-cleaner --token $(cat ~/.secrets/github-token)" + alias fork-cleaner="fork-cleaner --token \$(cat ~/.secrets/github-token 2>/dev/null)" alias vi="nvim" alias vim="nvim" alias v="nvim" -- cgit v1.2.3