zsh - Extending functionality

I might be an old fart that like it like it was. But I still decided to pimp my zsh with some useful additions, most notably git status symbols. This is what I ended up with as a starting point. Installed the following applications: doas pkg install zoxide eza starship Added below settings to $HOME/.zshrc: alias zls='zoxide query -l |fzf' alias ls='eza --icons -g' alias ll='eza --icons --git -glo --color=never' alias la='eza --icons --git -gloaa --color=never' alias tree='eza --icons --tree' alias grep='rg --color=auto' compdef eza=ls source <(fzf --zsh) bindkey -M viins "^H" fzf-history-widget bindkey -M vicmd "^H" fzf-history-widget # Alt+G: fzf cd from root (think global) fzf-cd-root-widget() { local dir dir=$(fd --type d . / --color=never --hidden 2>/dev/null | fzf +m) if [[ -n "$dir" ]]; then cd "$dir" zle reset-prompt fi } zle -N fzf-cd-root-widget bindkey '\eg' fzf-cd-root-widget eval "$(zoxide init zsh)" eval "$(starship init zsh)" And for the prompt I configured $HOME/.config/starship.toml like this: ...

May 19, 2026 · 2 min · 216 words · Björn Sjöberg

zsh - Autoloading functions

I figured it would be fun to convert some of my scripts into zsh functions. Who knows, one might learn a thing or two. I decided to store my functions in $HOME/bin/functions, and therefor added the below settings to $HOME/.zshrc: export fpath=($HOME/bin/functions /usr/local/share/zsh/site-functions $fpath) autoload -Uz $HOME/bin/functions/*(.:t)

May 14, 2026 · 1 min · 47 words · Björn Sjöberg

NixOS - Cleaning up old generations

Eventually every new NixOS user is going to run out of disk space. Or, atleast I did. Here’s how I did my housekeeping: # Keep 5 system generations sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations +5 # Same for your user profile nix-env --delete-generations old # Run garbage collection (this actually frees space) sudo nix-collect-garbage -d # Clean boot entries (removes old kernels from /boot) sudo /run/current-system/bin/switch-to-configuration boot

May 10, 2026 · 1 min · 66 words · Björn Sjöberg

Odlingsplan - 2026

Detta är planen för årets odlingar, redo att revideras.

May 10, 2026 · 1 min · 9 words · Björn Sjöberg