nixos-config/modules/home/zsh/default.nix

72 lines
2.2 KiB
Nix
Raw Normal View History

2023-11-05 17:56:55 +01:00
{ hostname, config, pkgs, ...}:
{
2023-11-05 11:40:44 +01:00
programs.zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
2023-11-05 18:41:02 +01:00
syntaxHighlighting.enable = true;
2023-11-05 11:40:44 +01:00
oh-my-zsh = {
enable = true;
2023-12-06 22:12:38 +01:00
plugins = [ "git" "fzf" ];
2023-11-05 11:40:44 +01:00
};
2023-12-16 00:05:49 +01:00
initExtraFirst = ''
DISABLE_MAGIC_FUNCTIONS=true
export "MICRO_TRUECOLOR=1"
'';
2023-11-05 11:40:44 +01:00
shellAliases = {
2023-11-05 21:47:04 +01:00
# record = "wf-recorder --audio=alsa_output.pci-0000_08_00.6.analog-stereo.monitor -f $HOME/Videos/$(date +'%Y%m%d%H%M%S_1.mp4')";
2023-11-05 21:55:37 +01:00
# Utils
2023-11-05 22:00:11 +01:00
c = "clear";
2023-11-05 21:47:04 +01:00
vim = "nvim";
2023-11-06 16:18:17 +01:00
cat = "bat";
2023-12-16 00:05:49 +01:00
nano = "micro";
2023-12-14 13:13:53 +01:00
icat = "kitten icat";
2023-12-16 00:05:49 +01:00
findw = "grep -rl";
2023-11-05 21:47:04 +01:00
l = "eza --icons -a --group-directories-first -1"; #EZA_ICON_SPACING=2
ll = "eza --icons -a --group-directories-first -1 --no-user --long";
tree = "eza --icons --tree --group-directories-first";
2023-11-05 11:40:44 +01:00
2023-11-05 21:55:37 +01:00
# Nixos
2023-12-06 18:37:05 +01:00
cdnix = "cd ~/nixos-config && codium ~/nixos-config";
2023-12-27 12:04:09 +01:00
nix-shell = "nix-shell --run zsh"
2023-11-05 21:55:37 +01:00
nix-switch = "sudo nixos-rebuild switch --flake ~/nixos-config#nixos";
nix-switchu = "sudo nixos-rebuild switch --upgrade --flake ~/nixos-config#nixos";
nix-flake-update = "sudo nix flake update ~/nixos-config#";
2023-11-11 17:15:06 +01:00
nix-clean = "sudo nix-collect-garbage && sudo nix-collect-garbage -d && sudo rm /nix/var/nix/gcroots/auto/* && nix-collect-garbage && nix-collect-garbage -d";
2023-11-05 21:47:04 +01:00
# nix-clean = "sudo nix-collect-garbage -d";
# nix-cleanold = "sudo nix-collect-garbage --delete-old";
# nix-cleanboot = "sudo /run/current-system/bin/switch-to-configuration boot";
2023-11-05 11:40:44 +01:00
2023-11-05 21:55:37 +01:00
# Git
2023-12-06 22:11:52 +01:00
ga = "git add";
gaa = "git add --all";
gs = "git status";
gb = "git branch";
gm = "git merge";
gpl = "git pull";
2023-11-05 21:55:37 +01:00
gplo = "git pull origin";
2023-12-06 22:11:52 +01:00
gps = "git push";
2023-11-05 21:55:37 +01:00
gpso = "git push origin";
2023-12-06 22:11:52 +01:00
gc = "git commit";
gcm = "git commit -m";
gch = "git checkout";
2023-11-05 21:55:37 +01:00
gchb = "git checkout -b";
gcoe = "git config user.email";
gcon = "git config user.name";
g = "lazygit";
2023-11-05 11:40:44 +01:00
# python
piv = "python -m venv .venv";
psv = "source .venv/bin/activate";
};
};
2023-12-06 22:05:30 +01:00
programs.zoxide = {
enable = true;
enableZshIntegration = true;
};
2023-11-05 11:40:44 +01:00
}