2024-11-16 13:38:09 -05:00
|
|
|
{ pkgs, ... }: {
|
2024-11-18 16:50:13 -05:00
|
|
|
# starship - a customizable prompt for any shell
|
|
|
|
programs.starship = {
|
|
|
|
enable = true;
|
|
|
|
# custom settings
|
|
|
|
settings = {
|
|
|
|
format =
|
|
|
|
"[](bg:#1e1e2e fg:#a6e3a1)$username$hostname[](fg:#a6e3a1 bg:#89b4fa)$directory[](fg:#89b4fa bg:#cba6f7)$direnv[](fg:#cba6f7 bg:#f9e2af)$git_branch$git_status[](fg:#f9e2af bg:#1e1e2e)$character";
|
|
|
|
username = {
|
|
|
|
show_always = true;
|
|
|
|
format = "[ $user@]($style)";
|
|
|
|
style_user = "fg:#313244 bg:#a6e3a1";
|
|
|
|
style_root = "fg:#313244 bg:#a6e3a1";
|
|
|
|
};
|
|
|
|
hostname = {
|
|
|
|
ssh_only = false;
|
|
|
|
format = "[$hostname $ssh_symbol]($style)";
|
|
|
|
style = "fg:#313244 bg:#a6e3a1";
|
|
|
|
};
|
|
|
|
directory = {
|
|
|
|
format = "[ $path ]($style)";
|
|
|
|
style = "fg:#313244 bg:#89b4fa";
|
|
|
|
};
|
|
|
|
git_branch = {
|
|
|
|
format = "[ $symbol$branch(:$remote_branch) ]($style)";
|
|
|
|
symbol = " ";
|
|
|
|
style = "fg:#313244 bg:#f9e2af";
|
|
|
|
};
|
|
|
|
direnv = {
|
|
|
|
symbol = " ";
|
|
|
|
format = "[ $symbol$loaded/$allowed ]($style)";
|
|
|
|
disabled = false;
|
|
|
|
style = "fg:#313244 bg:#cba6f7";
|
|
|
|
};
|
|
|
|
git_status = {
|
|
|
|
format = "[$all_status]($style)";
|
|
|
|
style = "fg:#313244 bg:#f9e2af";
|
|
|
|
};
|
|
|
|
git_metrics = {
|
|
|
|
format = "([+$added]($added_style))[]($added_style)";
|
|
|
|
added_style = "fg:#313244 bg:#f9e2af";
|
|
|
|
deleted_style = "fg:bright-red bg:235";
|
|
|
|
disabled = false;
|
|
|
|
};
|
|
|
|
hg_branch = {
|
|
|
|
format = "[ $symbol$branch ]($style)";
|
|
|
|
symbol = " ";
|
|
|
|
};
|
|
|
|
cmd_duration = {
|
|
|
|
format = "[ $duration ]($style)";
|
|
|
|
style = "fg:bright-white bg:18";
|
|
|
|
};
|
|
|
|
character = {
|
|
|
|
success_symbol = "[ ](#a6e3a1) ";
|
|
|
|
error_symbol = "[ ✗](#f38ba8) ";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
2024-11-16 13:38:09 -05:00
|
|
|
users.defaultUserShell = pkgs.zsh;
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
enableCompletion = true;
|
|
|
|
enableBashCompletion = true;
|
|
|
|
autosuggestions.enable = true;
|
|
|
|
syntaxHighlighting.enable = true;
|
|
|
|
shellInit = ''
|
|
|
|
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
histSize = 10000;
|
|
|
|
histFile = "$HOME/.zsh_history";
|
|
|
|
|
2024-11-16 22:04:54 -05:00
|
|
|
shellAliases = let ezaArgs = "--time-style='+%Y-%m-%d %H:%M' --icons";
|
|
|
|
in {
|
2024-11-16 13:38:09 -05:00
|
|
|
ff = "fastfetch";
|
|
|
|
neofetch = "fastfetch";
|
|
|
|
nf = "fastfetch";
|
2024-11-16 22:23:26 -05:00
|
|
|
|
2024-11-16 22:13:22 -05:00
|
|
|
lg = "lazygit";
|
|
|
|
lad = "lazydocker";
|
2024-11-16 22:23:26 -05:00
|
|
|
|
|
|
|
clip = "wl-copy";
|
|
|
|
paste = "wl-paste";
|
2024-11-16 20:34:53 -05:00
|
|
|
cat = "bat";
|
2024-11-16 13:38:09 -05:00
|
|
|
|
2024-11-16 22:04:54 -05:00
|
|
|
l = "eza -lhg ${ezaArgs}";
|
|
|
|
la = "eza -lAh ${ezaArgs}";
|
|
|
|
ll = "eza -lhg ${ezaArgs}";
|
|
|
|
ls = "eza ${ezaArgs}";
|
|
|
|
lsa = "eza -lah ${ezaArgs}";
|
2024-11-17 12:49:05 -05:00
|
|
|
tree = "eza --tree --git-ignore ${ezaArgs}";
|
2024-11-16 13:38:09 -05:00
|
|
|
|
2024-11-16 22:04:54 -05:00
|
|
|
nixrc = "$EDITOR /etc/nixos";
|
|
|
|
upd =
|
|
|
|
"sudo nixos-generate-config --dir /etc/nixos/hosts && sudo rm /etc/nixos/hosts/configuration.nix && sudo mv /etc/nixos/hosts/hardware-configuration.nix /etc/nixos/hosts/$(hostname).nix && git -C /etc/nixos --git-dir=/etc/nixos/.git add /etc/nixos/hosts/$(hostname).nix && sudo nixos-rebuild switch";
|
|
|
|
|
|
|
|
taildrop = "tailscale file";
|
|
|
|
|
|
|
|
forgejo-runner = "act_runner";
|
2024-11-16 22:13:22 -05:00
|
|
|
runactions =
|
|
|
|
"act_runner exec --default-actions-url=https://www.coastalcommits.com --gitea-instance=https://www.coastalcommits.com";
|
2024-11-16 13:38:09 -05:00
|
|
|
|
|
|
|
c = "clear";
|
|
|
|
# alias sudo to itself so user aliases can be sudoed
|
|
|
|
sudo = "sudo ";
|
|
|
|
s = "sudo ";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|