stable version. add scripts for fast update

This commit is contained in:
2025-11-14 04:22:12 +03:00
parent 2ec91a2043
commit d6dc169e1c
7 changed files with 115 additions and 35 deletions
+30 -25
View File
@@ -1,22 +1,38 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
zsh-powerlevel10k
fzf
fd
];
home.packages = with pkgs; [ zsh-powerlevel10k fzf fd eza zoxide ];
programs.zsh = {
loginShell = true;
enable = true;
autocd = true;
enableCompletion = true;
autosuggestions.enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history = {
append = true;
ignoreAllDups = true;
ignoreDups = true;
saveNoDups = true;
};
plugins = with pkgs; [
{
file = "powerlevel10k.zsh-theme";
name = "powerlevel10k";
src = "${zsh-powerlevel10k}/share/zsh-powerlevel10k";
}
{
file = "p10k.zsh";
name = "powerlevel10k-config";
src = ./p10k.zsh;
}
];
oh-my-zsh = {
enable = true;
theme = "powerlevel10k/powerlevel10k"; # agnoster refined nicoulaj
plugins = [
"git"
"python"
@@ -39,7 +55,7 @@
addpath = "export PATH=$PATH:$1";
tree = "eza --tree";
gitpa = "f() { git add -A && git commit -m \"$1\" && git push; }; f";
gitpa = ''f() { git add -A && git commit -m "$1" && git push; }; f'';
home-cnfg = "nvim ~/.config/home-manager/home.nix";
home-rr = "home-manager switch";
@@ -47,26 +63,13 @@
rr = "sudo nixos-rebuild switch";
};
initExtraBeforeCompInit = ''
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
'';
initExtra = ''
initContent = ''
zstyle ':omz:plugins:eza' 'git-status' yes
zstyle ':omz:plugins:eza' 'header' yes
zstyle ':omz:plugins:eza' 'icons' yes
ZOXIDE_CMD_OVERRIDE=cd
### --- HISTORY SETTINGS ------------------------------
HISTSIZE=5000
SAVEHIST=5000
HISTFILE=~/.zsh_history
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_SAVE_NO_DUPS
setopt SHARE_HISTORY
### --- COMPLETION TUNING -----------------------------
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
@@ -94,10 +97,12 @@
export FZF_DEFAULT_OPTS='--height 40% --layout=reverse --border'
fi
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
eval "$(zoxide init zsh --cmd cd)"
'';
};
home.file.".config/zsh/p10k.zsh".source = ./p10k.zsh;
home.file.".p10k.zsh".source = config.home.homeDirectory + "/.config/zsh/p10k.zsh";
home.file.".p10k.zsh".source = ./p10k.zsh;
}