dotfiles/modules/cli/zsh.nix

63 lines
1.7 KiB
Nix
Raw Normal View History

2021-09-11 13:34:35 +02:00
{ config, lib, pkgs, inputs, ... }:
2021-09-09 21:55:28 +02:00
2021-11-22 11:13:06 +01:00
{
environment.pathsToLink = [ "/share/zsh" ];
2021-11-29 11:57:46 +01:00
users.users.moritz.shell = pkgs.zsh;
2021-11-22 11:13:06 +01:00
home-manager.users.moritz = {
2021-11-04 17:29:55 +01:00
home.packages = with pkgs; [ du-dust ];
2021-09-09 21:55:28 +02:00
programs = {
zsh = {
enable = true;
dotDir = ".config/zsh";
2021-12-04 11:44:45 +01:00
history.expireDuplicatesFirst = true;
2021-12-12 12:20:08 +01:00
localVariables = { EDITOR = "emacsclient -nw -a 'emacs -nw'"; };
2021-09-29 13:35:14 +02:00
shellAliases = {
2021-11-04 17:29:55 +01:00
du = "dust";
2021-12-04 11:44:45 +01:00
ls = "exa -lh --icons --git";
2021-09-09 21:55:28 +02:00
cat = "bat";
2021-10-06 15:34:19 +02:00
feh = "feh --auto-zoom --scale-down";
2021-11-29 11:54:09 +01:00
us = "systemctl --user";
2021-12-30 11:14:32 +01:00
rs = "doas systemctl";
2021-12-04 11:44:45 +01:00
ga = "git add";
gb = "git branch";
gc = "git commit";
gco = "git checkout";
gd = "git diff";
gds = "git diff --staged";
gp = "git push";
gs = "git status";
2021-12-12 12:20:20 +01:00
ssh = "TERM=xterm-color ssh";
2021-12-14 12:20:44 +01:00
2021-12-30 11:14:32 +01:00
nix-switch = "doas nixos-rebuild switch --flake ~/.dotfiles";
nix-boot = "doas nixos-rebuild boot --flake ~/.dotfiles";
2021-12-14 12:20:44 +01:00
nix-lock =
2021-12-30 11:14:32 +01:00
"doas nixos-rebuild dry-activate --flake ~/.dotfiles --recreate-lock-file";
2021-09-09 21:55:28 +02:00
};
2021-10-26 09:33:55 +02:00
enableSyntaxHighlighting = true;
2021-09-11 13:53:32 +02:00
enableAutosuggestions = true;
enableCompletion = true;
2021-11-29 11:54:09 +01:00
initExtra = ''
function nix-which() {
readlink -f $(which $1)
}
'';
2021-10-31 19:45:06 +01:00
plugins = [{
name = "forgit";
src = inputs.forgit-git;
}];
2021-09-09 21:55:28 +02:00
};
2021-10-31 19:45:06 +01:00
fzf = {
enable = true;
enableZshIntegration = true;
};
2021-09-09 21:55:28 +02:00
starship = {
enable = true;
enableZshIntegration = true;
};
};
2021-11-22 11:13:06 +01:00
};
2021-09-09 21:55:28 +02:00
}