mio-ops/profiles/zsh.nix
2021-03-04 20:48:18 +10:00

29 lines
783 B
Nix

# Configuration common to all my servers
{ config, pkgs, lib, ... }:
{
# Program defaults for all hosts
programs.zsh = {
enable = true; # Also enables & installs nix-zsh-completions
autosuggestions.enable = true;
interactiveShellInit = ''
export TERM="xterm-256color"
eval "$(direnv hook zsh)"
test -r ~/.dir_colors && eval $(dircolors ~/.dir_colors)
export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
'';
ohMyZsh = {
enable = true;
plugins = [ "git" ];
};
promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";
};
users.defaultUserShell = pkgs.zsh; # Set the default shell for all users
}