35 lines
918 B
Nix
35 lines
918 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
|
|
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"];
|
|
};
|
|
vteIntegration = true;
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [fzf];
|
|
|
|
users.defaultUserShell = pkgs.zsh; # Set the default shell for all users
|
|
}
|