nixos-config/users/simon/modules/zsh.nix

59 lines
1.4 KiB
Nix

{ lib, pkgs, ... }:
let
dircolors-solarized = pkgs.fetchFromGitHub {
owner = "seebi";
repo = "dircolors-solarized";
rev = "65d4d595ceca96166139862131a006fa3079e00a";
sha256 = "1nl5rs24gi7zqg7nqsbf9fa94yggwzqf3n3imxgfywl8jny3cj1q";
meta.license = lib.licenses.mit;
};
in
{
programs = {
fzf.enable = true;
direnv = {
enable = true;
enableNixDirenvIntegration = true;
};
starship = {
enable = true;
settings = {
add_newline = false;
};
};
zsh = {
enable = true;
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell";
}
];
shellAliases = {
exa = "exa --git --binary";
l = "exa -l";
la = "exa -la";
ll = "exa -l";
ls = "exa";
ipy = "ipython3";
vim = "nvim";
vimdiff = "nvim -d";
userctl = "systemctl --user";
};
envExtra = ''
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on"
'';
initExtra = ''
eval $(${pkgs.coreutils}/bin/dircolors -b ${dircolors-solarized}/dircolors.ansi-universal)
# no sad smiley (starship shows exit status)
zstyle ':prompt:grml:right:setup' items
source ${../files/zsh/pass-wrappers.zsh}
'';
};
};
}