Files
alexm d2789aad7e
Sync README to GitHub / sync (push) Successful in 12s
feat: cleanup configs
2026-08-03 10:30:48 -04:00

66 lines
1.5 KiB
Nix

{
pkgs,
lib,
isDarwin,
...
}:
{
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ll = "ls -alF";
la = "ls -A";
l = "ls -CF";
tp = "tree -I '__init__*' -I '__pycache__'";
clear = "${pkgs.ncurses}/bin/clear";
zide = "zellij --layout ide";
};
sessionVariables = {
LANG = "en_US.UTF-8";
RUST_BACKTRACE = "1";
TYPST_FONT_PATHS = "$HOME/.fonts";
};
oh-my-zsh = {
enable = true;
theme = "";
plugins = [
"git"
"gh"
"git-auto-fetch"
"rust"
"ssh"
];
};
initContent = ''
# oh-my-zsh assumes macOS => BSD ls and aliases `ls -G`. But GNU
# coreutils `ls` (from nix) is first on PATH, where `-G` means
# --no-group, not color. Override after oh-my-zsh has loaded so ls
# actually colorizes (ll/la/l inherit this via alias expansion).
alias ls='ls --color=auto'
# Conditional Editor logic
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='nano'
else
export EDITOR='hx'
export GIT_EDITOR='hx'
fi
'';
};
home.sessionVariables = {
# ghostty (GTK) ships terminfo under $out/share on Linux. The macOS
# ghostty-bin bundles its own, so only add ncurses there.
TERMINFO_DIRS = lib.concatStringsSep ":" (
lib.optional (!isDarwin) "${pkgs.ghostty}/share/terminfo" ++ [ "${pkgs.ncurses}/share/terminfo" ]
);
};
}