Files
nixconfig/modules/home-manager/shell.nix
T

34 lines
882 B
Nix

{ config, lib, pkgs, inputs, ... }:
{
# configure z-shell to use omz with some plugins
programs.zsh = {
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
oh-my-zsh = {
enable = true;
# theme will be set below depending on the shell
theme = "";
# make omz faster on large repositories
custom = "DISABLE_UNTRACKED_FILES_DIRTY=true";
# add git and agents as plugins
plugins = [ "git" "ssh-agent" "gpg-agent" ];
};
# only display a fancy theme when glyphs are rendered
initContent = lib.mkOrder 550 ''
if [[ "$TERM" == "linux" || "$TERM" == "screen" ]]; then
ZSH_THEME="gentoo"
else
ZSH_THEME="agnoster"
fi
'';
};
# set important env vars
home.sessionVariables = {
EDITOR = "vim";
NH_FLAKE = "/home/aaron/git/nixconfig";
};
}