2021-03-04 10:48:18 +00:00
|
|
|
# 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)"
|
2021-07-12 23:44:14 +00:00
|
|
|
export GPODDER_HOME=~/.gPodder
|
2021-03-04 10:48:18 +00:00
|
|
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
|
|
|
gpgconf --launch gpg-agent
|
2021-06-07 04:36:32 +00:00
|
|
|
if type rg &> /dev/null; then
|
|
|
|
export FZF_DEFAULT_COMMAND='rg --files'
|
|
|
|
export FZF_DEFAULT_OPTS='-m --height 50% --border'
|
|
|
|
fi
|
2021-03-04 10:48:18 +00:00
|
|
|
'';
|
|
|
|
ohMyZsh = {
|
|
|
|
enable = true;
|
2021-06-07 04:36:32 +00:00
|
|
|
plugins = [
|
|
|
|
"fzf"
|
|
|
|
"git"
|
|
|
|
];
|
|
|
|
theme = "powerlevel9k";
|
2021-03-04 10:48:18 +00:00
|
|
|
};
|
|
|
|
promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";
|
2021-07-12 23:44:14 +00:00
|
|
|
vteIntegration = true;
|
2021-03-04 10:48:18 +00:00
|
|
|
};
|
|
|
|
|
2021-06-07 04:36:32 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
fzf
|
|
|
|
];
|
|
|
|
|
2021-03-04 10:48:18 +00:00
|
|
|
users.defaultUserShell = pkgs.zsh; # Set the default shell for all users
|
|
|
|
|
|
|
|
}
|