2026-03-06 06:06:10 +03:00
|
|
|
{ config, osConfig, pkgs, lib, ... }: {
|
2024-09-27 23:08:41 +03:00
|
|
|
programs = {
|
|
|
|
|
zoxide.enable = true;
|
2024-09-28 18:36:18 +03:00
|
|
|
fzf.enable = true;
|
2024-09-27 23:08:41 +03:00
|
|
|
|
|
|
|
|
starship = {
|
|
|
|
|
enable = true;
|
|
|
|
|
enableZshIntegration = true;
|
2024-04-17 05:52:14 +05:00
|
|
|
|
2024-09-27 23:08:41 +03:00
|
|
|
settings = {
|
|
|
|
|
add_newline = true;
|
|
|
|
|
format = ''
|
|
|
|
|
$os$directory$git_branch$git_status
|
2025-01-17 16:20:31 +03:00
|
|
|
$nix_shell$status$character
|
2024-09-27 23:08:41 +03:00
|
|
|
'';
|
|
|
|
|
right_format = "$all";
|
2024-04-23 11:48:43 +03:00
|
|
|
|
2024-09-27 23:08:41 +03:00
|
|
|
cmake.disabled = true;
|
|
|
|
|
cmd_duration = {
|
|
|
|
|
format = "";
|
|
|
|
|
show_notifications = true;
|
|
|
|
|
notification_timeout = 10000;
|
|
|
|
|
};
|
|
|
|
|
git_branch.format = "on [$branch(:$remote_branch)]($style) ";
|
|
|
|
|
git_metrics.disabled = false;
|
|
|
|
|
git_status = {
|
|
|
|
|
conflicted = "!";
|
|
|
|
|
up_to_date = "ok";
|
|
|
|
|
stashed = "S";
|
|
|
|
|
modified = "M";
|
|
|
|
|
};
|
|
|
|
|
directory = {
|
|
|
|
|
truncation_length = 3;
|
|
|
|
|
fish_style_pwd_dir_length = 1;
|
|
|
|
|
read_only = " RO";
|
|
|
|
|
};
|
2025-01-17 16:20:31 +03:00
|
|
|
nix_shell.format = "[nix-shell]($style) ";
|
2024-09-27 23:08:41 +03:00
|
|
|
os.disabled = false;
|
|
|
|
|
python = {
|
|
|
|
|
symbol = "py ";
|
|
|
|
|
python_binary = ["python3" "python"];
|
|
|
|
|
};
|
|
|
|
|
status.disabled = false;
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-04-17 05:52:14 +05:00
|
|
|
|
2024-09-27 23:08:41 +03:00
|
|
|
zsh = {
|
2024-04-17 05:52:14 +05:00
|
|
|
enable = true;
|
2024-09-27 23:08:41 +03:00
|
|
|
enableCompletion = true;
|
|
|
|
|
autosuggestion.enable = true;
|
|
|
|
|
syntaxHighlighting.enable = true;
|
|
|
|
|
|
2026-03-06 06:06:10 +03:00
|
|
|
shellAliases = {
|
|
|
|
|
rb = "nh os switch";
|
|
|
|
|
trb = "nh os test";
|
|
|
|
|
upd = "nix flake update --flake ~/nix";
|
2024-09-27 23:08:41 +03:00
|
|
|
|
2024-11-26 22:07:44 +03:00
|
|
|
cat = "${pkgs.lib.getExe pkgs.bat}";
|
2024-09-27 23:08:41 +03:00
|
|
|
cd = "z";
|
2025-01-25 21:08:56 +03:00
|
|
|
lg = "lazygit";
|
2025-12-01 01:18:17 +03:00
|
|
|
s = "nix-shell . --run zsh";
|
2026-03-06 06:06:10 +03:00
|
|
|
} // lib.optionalAttrs osConfig.boot.loader.grub.useOSProber {
|
|
|
|
|
win = "sudo grub-reboot 2; sudo reboot";
|
2024-09-27 23:08:41 +03:00
|
|
|
};
|
|
|
|
|
|
2025-06-08 02:46:53 +03:00
|
|
|
initContent = ''
|
2024-09-27 23:08:41 +03:00
|
|
|
eval "$(zoxide init zsh)"
|
2024-09-28 18:36:18 +03:00
|
|
|
source "$(fzf-share)/key-bindings.zsh"
|
|
|
|
|
source "$(fzf-share)/completion.zsh"
|
2024-09-27 23:08:41 +03:00
|
|
|
'';
|
|
|
|
|
|
2025-03-27 12:53:41 +03:00
|
|
|
envExtra = ''
|
|
|
|
|
TERM=xterm-256color
|
|
|
|
|
'';
|
|
|
|
|
|
2025-11-28 20:51:05 +03:00
|
|
|
history = {
|
|
|
|
|
size = 10000;
|
|
|
|
|
path = "${config.xdg.dataHome}/zsh/history";
|
|
|
|
|
expireDuplicatesFirst = true;
|
|
|
|
|
ignoreDups = true;
|
|
|
|
|
};
|
2024-09-27 23:08:41 +03:00
|
|
|
|
|
|
|
|
oh-my-zsh.enable = true;
|
2024-04-17 05:52:14 +05:00
|
|
|
};
|
2026-03-06 06:06:10 +03:00
|
|
|
|
|
|
|
|
nh = {
|
|
|
|
|
enable = true;
|
|
|
|
|
flake = "nix";
|
|
|
|
|
};
|
2024-04-17 05:52:14 +05:00
|
|
|
};
|
|
|
|
|
}
|