91 lines
2.2 KiB
Nix
91 lines
2.2 KiB
Nix
{ config, osConfig, pkgs, lib, ... }: {
|
|
home.packages = [ pkgs.nh ];
|
|
|
|
programs = {
|
|
zoxide.enable = true;
|
|
fzf.enable = true;
|
|
|
|
starship = {
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
|
|
settings = {
|
|
add_newline = true;
|
|
format = ''
|
|
$os$directory$git_branch$git_status
|
|
$nix_shell$status$character
|
|
'';
|
|
right_format = "$all";
|
|
|
|
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";
|
|
};
|
|
nix_shell.format = "[nix-shell]($style) ";
|
|
os.disabled = false;
|
|
python = {
|
|
symbol = "py ";
|
|
python_binary = ["python3" "python"];
|
|
};
|
|
status.disabled = false;
|
|
};
|
|
};
|
|
|
|
zsh = {
|
|
enable = true;
|
|
enableCompletion = true;
|
|
autosuggestion.enable = true;
|
|
syntaxHighlighting.enable = true;
|
|
|
|
shellAliases = let
|
|
flakeDir = "~/nix";
|
|
in {
|
|
rb = "nh os switch ${flakeDir}";
|
|
trb = "nh os test ${flakeDir}";
|
|
upd = "nix flake update --flake ${flakeDir}";
|
|
|
|
cat = "${pkgs.lib.getExe pkgs.bat}";
|
|
cd = "z";
|
|
lg = "lazygit";
|
|
s = "nix-shell . --run zsh";
|
|
} // lib.optionalAttrs osConfig.boot.loader.grub.useOSProber {
|
|
win = "sudo grub-reboot 2; sudo reboot";
|
|
};
|
|
|
|
initContent = /*bash*/ ''
|
|
eval "$(zoxide init zsh)"
|
|
source "$(fzf-share)/key-bindings.zsh"
|
|
source "$(fzf-share)/completion.zsh"
|
|
'';
|
|
|
|
envExtra = ''
|
|
TERM=xterm-256color
|
|
'';
|
|
|
|
history = {
|
|
size = 10000;
|
|
path = "${config.xdg.dataHome}/zsh/history";
|
|
expireDuplicatesFirst = true;
|
|
ignoreDups = true;
|
|
};
|
|
|
|
oh-my-zsh.enable = true;
|
|
};
|
|
};
|
|
}
|