reciproka-ops/profiles/zsh.nix

43 lines
1,015 B
Nix
Raw Permalink Normal View History

2021-10-07 02:13:48 +00:00
# Configuration common to all JFDIC servers
{
2022-08-15 07:32:25 +00:00
config,
pkgs,
lib,
...
}: {
2021-10-07 02:13:48 +00:00
# Program defaults for all hosts
programs.zsh = {
2022-08-15 07:32:25 +00:00
enable = true; # Also enables & installs nix-zsh-completions
2021-10-07 02:13:48 +00:00
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
if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_DEFAULT_OPTS='-m --height 50% --border'
fi
'';
ohMyZsh = {
enable = true;
plugins = [
"fzf"
"git"
];
};
promptInit = ''
eval "$(starship init zsh)"
'';
vteIntegration = true;
};
environment.systemPackages = with pkgs; [
fzf
];
2022-08-15 07:32:25 +00:00
users.defaultUserShell = pkgs.zsh; # Set the default shell for all users
2021-10-07 02:13:48 +00:00
}