zsh.nix
August 24, 2026 · View on GitHub
Disclaimer
⚠️ This is a personal hobby project developed in spare time.
- The API surface is unstable and may change without notice
- Pin a revision in your flake if you depend on zsh.nix
- Built with AI assistance
- No support commitment or warranty
Configuration
{
vi.enable = true;
autosuggestion.enable = true;
syntaxHighlighting.integrations.patina.enable = true;
completion = {
enable = true;
integrations.fzf.enable = true;
};
history.integrations.fzf.enable = true;
integrations = {
git.enable = true;
docker.enable = true;
npm.enable = true;
mvn.enable = true;
};
aliases = {
ll = "ls -l";
gs = "git status";
};
setopt = [
"AUTO_CD"
"EXTENDED_GLOB"
];
unsetopt = [ "BEEP" ];
}
Run the same style of configured shell with:
nix run
Extending Zsh with Custom Modules
How to add a custom module
You can define a module directly in your configuration and add it to the imports list. This approach gives you full access to the NixOS module system.
{
imports = [
({ config, lib, pkgs, ... }: {
# Define your module's logic
zsh.startPlugins.my-plugin = {
package = pkgs.zsh-autosuggestions;
source = "share/zsh-autosuggestions/zsh-autosuggestions.zsh";
};
initConfig = "echo 'Hello from my custom module!'";
})
];
}