Skip to content

Instantly share code, notes, and snippets.

@alycda
Last active December 29, 2025 01:00
Show Gist options
  • Select an option

  • Save alycda/7fda46c8aeab325e360b7ca83769a5cb to your computer and use it in GitHub Desktop.

Select an option

Save alycda/7fda46c8aeab325e360b7ca83769a5cb to your computer and use it in GitHub Desktop.
My ZSH setup as a flake and nix-shell
{
outputs = { self, ... }: {
homeManagerModules.zsh = import ./zsh.nix;
};
}
{ config, pkgs, ... }:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
# Modern replacements
ls = "eza";
ll = "eza -l";
la = "eza -la";
tree = "eza --tree";
};
history = {
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
initContent = ''
# Direnv
eval "$(direnv hook zsh)"
# Custom prompt or other config
setopt AUTO_CD
setopt HIST_IGNORE_DUPS
'';
};
# Install required packages
home.packages = with pkgs; [
eza
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment