Files

63 lines
1.9 KiB
Nix

{ config, lib, pkgs, ... }:
{
home.packages = [ pkgs.fastfetch ];
programs.zsh = {
enable = true;
dotDir = config.home.homeDirectory;
# The login shell stays the distro's zsh (/usr/bin/zsh); it reads these files.
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history = {
size = 50000;
save = 50000;
share = true;
ignoreDups = true;
};
oh-my-zsh = {
enable = true;
theme = "xiong-chiamiov-plus";
plugins = [ "git" "virtualenv" ] ++ lib.optional (lib.elem config.dotfiles.os [ "arch" "cachyos" "steamos" ]) "archlinux";
};
envExtra = ''
# Nix itself: single-user installs (SteamOS, containers) and multi-user daemons.
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
elif [ -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
fi
export MISE_EXPERIMENTAL=1
'';
initContent = lib.mkMerge [
(lib.mkOrder 550 ''
# Machine-local overrides (not in git): POKEMON, POKEMON_SHINY_PERCENT, aliases...
[ -f "$HOME/.config/dotfiles/local.zsh" ] && source "$HOME/.config/dotfiles/local.zsh"
'')
# After mise activation (default order), which puts pokemon-go-colorscripts on PATH.
(lib.mkOrder 1500 ''
source ${./files/pokefetch.zsh}
'')
];
};
programs.bash = {
enable = true;
# Hand interactive bash sessions to zsh where chsh isn't possible (e.g. webtops).
initExtra = ''
if [ -z "$DOTFILES_NO_ZSH" ] && [ -z "$ZSH_VERSION" ] && command -v zsh >/dev/null && [[ $- == *i* ]] && [ "$SHLVL" -le 2 ]; then
exec zsh -l
fi
'';
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
programs.btop.enable = true;
programs.fzf.enable = true;
}