47 lines
1.1 KiB
Nix
Raw Normal View History

2024-04-17 05:52:14 +05:00
{ config, ... }: {
2024-08-25 21:53:34 +03:00
programs.zoxide.enable = true;
2024-04-17 05:52:14 +05:00
programs.zsh = {
enable = true;
enableCompletion = true;
# enableAutosuggestions = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases =
let
flakeDir = "~/nix";
in {
rb = "sudo nixos-rebuild switch --flake ${flakeDir}";
upd = "nix flake update ${flakeDir}";
upg = "sudo nixos-rebuild switch --upgrade --flake ${flakeDir}";
hms = "home-manager switch --flake ${flakeDir}";
2024-08-25 19:10:00 +03:00
conf = "$EDITOR ${flakeDir}/nixos/hosts/$(hostname)/configuration.nix";
2024-05-01 15:43:11 +03:00
pkgs = "$EDITOR ${flakeDir}/nixos/packages.nix";
2024-04-17 05:52:14 +05:00
ll = "ls -l";
se = "sudoedit";
ff = "fastfetch";
2024-04-23 16:25:49 +03:00
cat = "bat";
2024-08-25 21:53:34 +03:00
cd = "z";
2024-04-17 05:52:14 +05:00
};
2024-04-23 11:48:43 +03:00
initExtra = ''
if [ -z "''${WAYLAND_DISPLAY}" ] && [ "''${XDG_VTNR}" -eq 1 ]; then
dbus-run-session Hyprland
fi
2024-08-25 21:53:34 +03:00
eval "$(zoxide init zsh)"
2024-04-23 11:48:43 +03:00
'';
2024-04-17 05:52:14 +05:00
history.size = 10000;
history.path = "${config.xdg.dataHome}/zsh/history";
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" ];
theme = "agnoster"; # blinks is also really nice
};
};
}