Shell
Platforms: NixOS and nix-darwin. See Darwin.
Shell modules under othrys.system.shell.*. Located in modules/system/shell/.
Available Modules
| Module | Option | Description |
|---|---|---|
| Zsh | othrys.system.shell.zsh | Primary shell with plugins, completions, aliases |
| Bash | othrys.system.shell.bash | Fallback shell |
| Starship | othrys.system.shell.starship | Cross-shell prompt |
Zsh
Full-featured Zsh with:
- Plugin management (syntax highlighting, autosuggestions, completions)
- Direnv integration for automatic dev shell activation
- Zoxide for smart directory jumping
- Toggleable alias presets (
aliasPresets.{nix,navigation,modernUnix,editor,git,python,jvm,ansible,opentofu,node,docker,clipboard}, all on by default exceptclipboard, which followsothrys.desktop.graphicalon NixOS and is off on darwin, where macOS has its ownpbcopy) plusextraAliasesfor consumer additions - Persistence for history and the zoxide database. History is kept in
~/.local/share/zsh/history, and the module persists that directory rather than the file, since zsh saves history by renaming a temporary file overHISTFILEand a rename onto a bind-mounted file fails. The direnv allow database is persisted byothrys.apps.development, which owns direnv.
Enabling zsh makes it the primary user’s login shell through
othrys.system.users.defaultShell, which a host overrides when it wants
another. On darwin the login shell applies only to an account nix-darwin
owns, which takes othrys.system.users.uid, and the nix preset’s
rebuild runs darwin-rebuild switch, with no rebuild-test. The nix preset’s nix-clean keeps a week of generations, so a
rollback target survives it.
The default editor behind EDITOR/VISUAL, git’s core.editor, and the v/vim/vi aliases is othrys.system.defaultEditor (default vim). The variables are set once, through environment.variables, and an editor module such as nixvim makes itself the default with mkDefault when enabled.
Starship
Minimal, fast prompt with Git integration. Every segment the module formats, the directory included, sits in square brackets with no space between segments, so a prompt reads like [alice@host][src][ main]. The first segment holds the user and the host and shows on every host, local or over SSH. The time sits in brackets on the right. Its colours come from othrys.theme.palette. On a host with no palette the layout is the same and each colour is an ANSI name, which the terminal resolves.