nixos-configuration/home/zsh.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

2022-02-15 15:44:40 +01:00
{ pkgs, ... }: {
programs.zsh = {
enable = true;
2024-06-15 16:02:25 +02:00
autosuggestion.enable = true;
2022-02-15 15:44:40 +01:00
enableCompletion = true;
autocd = true;
dotDir = ".config/zsh";
history = {
expireDuplicatesFirst = true;
ignoreDups = true;
};
oh-my-zsh = {
enable = true;
# theme = "robbyrussell";
# theme = "agnoster";
# theme = "ys";
# theme = "lambda-mod";
plugins = [
"git"
"gitignore"
2022-06-13 19:23:49 +02:00
"rust"
2022-02-15 15:44:40 +01:00
"torrent"
];
};
shellAliases = {
sudo = "sudo ";
sprunge = "curl -F 'sprunge=<-' http://sprunge.us";
};
localVariables = {
REPORTTIME = 10;
TIMEFMT = "\nreal\t%*E\nuser\t%*U\nsys\t%*S\nmaxmem\t%M MB\nfaults\t%F";
NIX_PATH = "$HOME/.nix-defexpr/channels\${NIX_PATH:+:}$NIX_PATH";
TERM = "xterm-256color";
RUSTC_WRAPPER = "sccache";
GOROOT = "$HOME/go";
PATH = "$PATH:$HOME/.cargo/bin:$GOROOT/bin:$GOPATH/bin";
};
initExtra = ''
[ -f $HOME/.nix-profile/etc/profile.d/nix.sh ] && . $HOME/.nix-profile/etc/profile.d/nix.sh
source ${pkgs.antigen}/share/antigen/antigen.zsh
# TODO: remove on NixOS
antigen bundle spwhitt/nix-zsh-completions
antigen bundle zsh-users/zsh-autosuggestions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen theme https://github.com/denysdovhan/spaceship-zsh-theme spaceship
# antigen theme https://github.com/halfo/lambda-mod-zsh-theme lambda-mod
antigen apply
'';
};
}