mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: set zsh config to mine (mostly)
This commit is contained in:
parent
99954a97f1
commit
382d4c34d8
1 changed files with 89 additions and 65 deletions
|
|
@ -1,38 +1,47 @@
|
|||
{ hostname, config, pkgs, host, ...}:
|
||||
{
|
||||
programs.zsh = {
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autocd = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "fzf" ];
|
||||
enableCompletion = true;
|
||||
|
||||
localVariables = {
|
||||
# Looks like this: '~/some/path > '
|
||||
PS1 = "%F{magenta}%~%f > ";
|
||||
# Gets pushed to the home directory otherwise
|
||||
LESSHISTFILE = "/dev/null";
|
||||
# Make Vi mode transitions faster (in hundredths of a second)
|
||||
# KEYTIMEOUT = 1;
|
||||
LANG = "en_US.UTF-8";
|
||||
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=#808080";
|
||||
};
|
||||
initExtraFirst = ''
|
||||
DISABLE_MAGIC_FUNCTIONS=true
|
||||
export "MICRO_TRUECOLOR=1"
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
# 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')";
|
||||
|
||||
# Utils
|
||||
c = "clear";
|
||||
cd = "z";
|
||||
tt = "gtrash put";
|
||||
cat = "bat";
|
||||
nano = "micro";
|
||||
code = "codium";
|
||||
py = "python";
|
||||
icat = "kitten icat";
|
||||
dsize = "du -hs";
|
||||
findw = "grep -rl";
|
||||
|
||||
l = "eza --icons -a --group-directories-first -1"; #EZA_ICON_SPACING=2
|
||||
ll = "eza --icons -a --group-directories-first -1 --no-user --long";
|
||||
ls = "eza -lh";
|
||||
la = "eza -A";
|
||||
ll = "eza -l";
|
||||
lla = "eza -lA";
|
||||
# :q = "exit";
|
||||
ezit = "exit";
|
||||
notes = "nvim ~/Documents/todo.md";
|
||||
todo = "nvim ~/Documents/todo.md";
|
||||
irc = "ssh irc";
|
||||
tmuxconf = "nvim ~/.config/tmux/tmux.conf";
|
||||
nvimconf = "cd ~/.config/nvim && nvim";
|
||||
termconf = "nvim ~/.config/alacritty/alacritty.yml";
|
||||
wc = "wl-copy";
|
||||
zshrc = "nvim ~/.zshrc";
|
||||
yt-dlp-audio = "yt-dlp -f 'ba' -x --audio-format mp3";
|
||||
emerge = "doas emerge";
|
||||
zshconf = "nvim ~/.zshrc";
|
||||
open = "xdg-open";
|
||||
tree = "eza --icons --tree --group-directories-first";
|
||||
nvim = "nix run /home/liv/Development/nixvim --";
|
||||
doas = "sudo";
|
||||
|
||||
# Nixos
|
||||
# NixOS
|
||||
cdnix = "cd ~/nixos-config && codium ~/nixos-config";
|
||||
ns = "nix-shell --run zsh";
|
||||
nix-shell = "nix-shell --run zsh";
|
||||
|
|
@ -40,35 +49,50 @@
|
|||
nix-switchu = "sudo nixos-rebuild switch --upgrade --flake ~/nixos-config#${host}";
|
||||
nix-flake-update = "sudo nix flake update ~/nixos-config#";
|
||||
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";
|
||||
|
||||
# Git
|
||||
ga = "git add";
|
||||
gaa = "git add --all";
|
||||
gs = "git status";
|
||||
gb = "git branch";
|
||||
gm = "git merge";
|
||||
gpl = "git pull";
|
||||
gplo = "git pull origin";
|
||||
gps = "git push";
|
||||
gpst = "git push --follow-tags";
|
||||
gpso = "git push origin";
|
||||
gc = "git commit";
|
||||
gcm = "git commit -m";
|
||||
gcma = "git add --all && git commit -m";
|
||||
gtag = "git tag -ma";
|
||||
gch = "git checkout";
|
||||
gchb = "git checkout -b";
|
||||
gcoe = "git config user.email";
|
||||
gcon = "git config user.name";
|
||||
|
||||
# python
|
||||
piv = "python -m venv .venv";
|
||||
psv = "source .venv/bin/activate";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zoxide = {
|
||||
plugins = with pkgs; [
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "0.6.0";
|
||||
sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
|
||||
};
|
||||
file = "zsh-syntax-highlighting.zsh";
|
||||
}
|
||||
{
|
||||
name = "zsh-abbr";
|
||||
src = fetchFromGitHub {
|
||||
owner = "olets";
|
||||
repo = "zsh-abbr";
|
||||
rev = "752e9fcc4daff680545c30f8f857913d66f6f5e6";
|
||||
sha256 = "sha256-HY/F43fpWn1PBYb2c+qp0CyF3hpSFHUZdZLZRS1d9Yc=";
|
||||
};
|
||||
file = "zsh-abbr.sh";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hlissner";
|
||||
repo = "zsh-autopair";
|
||||
rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49";
|
||||
sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1";
|
||||
};
|
||||
file = "autopair.zsh";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue