58 lines
1.2 KiB
Nix
58 lines
1.2 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
home.packages = with pkgs; [ zsh-syntax-highlighting ];
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
enableAutosuggestions = true;
|
|
|
|
shellAliases = {
|
|
sc = "systemctl";
|
|
scu = "systemctl --user";
|
|
|
|
ns = "nix search nixpkgs";
|
|
|
|
lg = pkgs.lazygit + /bin/lazygit;
|
|
};
|
|
sessionVariables = { ZSH_CUSTOM = ./zsh/omz-custom; };
|
|
|
|
initExtra = ''
|
|
export-emacs () {
|
|
if [ "$(emacsclient -e t)" != 't' ]; then
|
|
return 1
|
|
fi
|
|
|
|
for name in "''${@}"; do
|
|
value=$(eval echo \"\''${''${name}//\\\"/\\\\042}\")
|
|
emacsclient -e "(setenv \"''${name}\" \"''${value}\")" >/dev/null
|
|
done
|
|
}
|
|
|
|
cite () {
|
|
http --follow --body "https://doi.org/$1" "Accept: text/x-bibliography; style=chicago-author-date" | tee >(wl-copy)
|
|
}
|
|
'';
|
|
|
|
oh-my-zsh = {
|
|
enable = true;
|
|
plugins = [
|
|
"vi-mode"
|
|
"git"
|
|
"git-flow"
|
|
"mercurial"
|
|
"fd"
|
|
"fasd"
|
|
"virtualenv"
|
|
"rvm"
|
|
"extract"
|
|
"vagrant"
|
|
"docker"
|
|
"archlinux"
|
|
];
|
|
};
|
|
};
|
|
|
|
}
|