stockholm/makefu/2configs/home-manager/zsh.nix

87 lines
2.4 KiB
Nix
Raw Normal View History

{ pkgs, ... }:
{
programs = {
ssh.startAgent = false;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
imports = [
{ #direnv
2020-07-02 06:35:55 +00:00
home-manager.users.makefu.home.packages = [
(pkgs.writers.writeDashBin "privatefox" "exec firefox -P Privatefox")
2021-01-18 22:01:13 +00:00
];
}
{ # bat
2020-07-02 06:35:55 +00:00
home-manager.users.makefu.home.packages = [ pkgs.bat ];
home-manager.users.makefu.programs.zsh.shellAliases = {
cat = "bat --style=header,snip";
2020-04-22 06:16:49 +00:00
mirage = "sxiv"; # only available when tools/extra-gui is in use
catn = "${pkgs.coreutils}/bin/cat";
2019-04-17 19:44:00 +00:00
ncat = "${pkgs.coreutils}/bin/cat";
};
}
];
environment.pathsToLink = [ "/share/zsh" ];
2021-01-18 22:01:13 +00:00
programs.direnv.enable = true;
programs.direnv.enableNixDirenvIntegration = true;
home-manager.users.makefu = {
programs.fzf.enable = false; # alt-c
programs.zsh = {
enable = true;
enableAutosuggestions = false;
enableCompletion = true;
oh-my-zsh.enable = false;
history = {
size = 900001;
save = 900001;
ignoreDups = true;
extended = true;
share = true;
};
sessionVariables = {
2019-02-05 21:33:09 +00:00
# TERM = "rxvt-unicode-256color";
TERM = "xterm";
LANG = "en_US.UTF8";
LS_COLORS = ":di=1;31:";
EDITOR = "vim";
};
shellAliases = {
lsl = "ls -lAtr";
t = "task";
xo = "mimeopen";
nmap = "nmap -oN $HOME/loot/scan-`date +\%s`.nmap -oX $HOME/loot/scan-`date +%s`.xml";
};
# navi package does not come with the navi.plugin.zsh anymore so we use .src
initExtra = ''
bindkey -e
# shift-tab
bindkey '^[[Z' reverse-menu-complete
bindkey "\e[3~" delete-char
zstyle ':completion:*' menu select
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
compdef _pass brain
zstyle ':completion::complete:brain::' prefix "$HOME/brain"
compdef _pass secrets
zstyle ':completion::complete:secrets::' prefix "$HOME/.secrets-pass/"
2020-07-02 06:35:55 +00:00
# navi
. ${pkgs.navi.src}/shell/navi.plugin.zsh
# ctrl-x ctrl-e
2020-07-02 06:35:55 +00:00
autoload -U compinit && compinit
autoload -U edit-command-line
zle -N edit-command-line
bindkey '^xe' edit-command-line
bindkey '^x^e' edit-command-line
'';
};
};
}