2023-05-02 22:47:01 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-05-02 23:16:23 +02:00
|
|
|
let
|
|
|
|
omz-plugins = [
|
|
|
|
"git"
|
|
|
|
"archlinux"
|
|
|
|
"composer"
|
|
|
|
"colored-man-pages"
|
|
|
|
"extract"
|
|
|
|
"gradle"
|
|
|
|
"node"
|
|
|
|
"npm"
|
|
|
|
"rbenv"
|
|
|
|
"sudo"
|
|
|
|
"direnv"
|
|
|
|
"docker"
|
|
|
|
"docker-compose"
|
|
|
|
"golang"
|
|
|
|
"pip"
|
|
|
|
"history"
|
|
|
|
"vagrant"
|
|
|
|
];
|
|
|
|
in {
|
2023-05-02 22:47:01 +02:00
|
|
|
programs.zsh = {
|
2023-05-02 23:16:23 +02:00
|
|
|
enable = true;
|
|
|
|
enableAutosuggestions = true;
|
|
|
|
enableCompletion = true;
|
|
|
|
enableVteIntegration = true;
|
2023-08-21 02:24:55 +02:00
|
|
|
syntaxHighlighting.enable = true;
|
2023-05-02 23:16:23 +02:00
|
|
|
shellAliases = {
|
|
|
|
pub-ipv4 = "curl ip4.clerie.de";
|
|
|
|
serve = "python -m SimpleHTTPServer 8080";
|
|
|
|
week = "date +%V";
|
|
|
|
path = "echo -e \${PATH//:/\\n}";
|
|
|
|
distro = "cat /etc/*-release";
|
|
|
|
reload = "source ~/.zshrc";
|
|
|
|
undo-git-reset-head = "git reset 'HEAD@{1}'";
|
|
|
|
update-local = "bash $HOME/.dotfiles/install";
|
|
|
|
};
|
|
|
|
zplug = {
|
2023-05-02 22:47:01 +02:00
|
|
|
enable = true;
|
2023-05-02 23:16:23 +02:00
|
|
|
plugins = map (x: {
|
|
|
|
name = "plugins/${x}";
|
|
|
|
tags = [ "from:oh-my-zsh" ];
|
2023-05-03 00:43:33 +02:00
|
|
|
}) omz-plugins;
|
2023-05-02 22:47:01 +02:00
|
|
|
};
|
2023-05-22 20:17:53 +02:00
|
|
|
initExtra = ''
|
|
|
|
eval $(${pkgs.thefuck}/bin/thefuck --alias)
|
2023-10-04 02:09:37 +02:00
|
|
|
[ -d ~/.npm-global ] || mkdir ~/.npm-global
|
|
|
|
${pkgs.nodejs}/bin/npm config set prefix '~/.npm-global'
|
|
|
|
export PATH=~/.npm-global/bin:$PATH
|
2023-05-22 20:17:53 +02:00
|
|
|
'';
|
2023-05-02 23:16:23 +02:00
|
|
|
};
|
2023-05-02 22:47:01 +02:00
|
|
|
}
|