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-19 22:17:10 -05:00
|
|
|
add_newline = false;
|
2024-11-18 16:50:13 -05:00
|
|
|
};
|
|
|
|
};
|
2024-11-22 09:07:36 -05:00
|
|
|
users.defaultUserShell = pkgs.fish;
|
|
|
|
programs.fish = {
|
2024-11-16 13:38:09 -05:00
|
|
|
enable = true;
|
|
|
|
shellInit = ''
|
|
|
|
export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin"
|
|
|
|
'';
|
|
|
|
|
2024-11-22 09:07:36 -05:00
|
|
|
shellAliases = let ezaArgs = "--time-style='+%Y-%m-%d %H:%M' --icons=auto";
|
2024-11-16 22:04:54 -05:00
|
|
|
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-22 09:07:36 -05:00
|
|
|
git = "hub";
|
2024-11-16 13:38:09 -05:00
|
|
|
|
2024-11-19 14:17:29 -05:00
|
|
|
create-devenv = "nix flake init --template github:cachix/devenv && direnv allow";
|
|
|
|
develop = "nix develop --no-pure-eval";
|
2024-11-22 09:07:36 -05:00
|
|
|
nixpkgs-update = "nix run --option extra-substituters 'https://nix-community.cachix.org/' --option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' github:ryantm/nixpkgs-update --";
|
2024-11-16 22:04:54 -05:00
|
|
|
nixrc = "$EDITOR /etc/nixos";
|
2024-11-22 09:07:36 -05:00
|
|
|
delete-vscode-settings-backup = "rm -rf ~/.config/Code/User/settings.json.bak";
|
2024-11-16 22:04:54 -05:00
|
|
|
upd =
|
2024-11-22 09:07:36 -05:00
|
|
|
"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 && delete-vscode-settings-backup && sudo nixos-rebuild switch --flake /etc/nixos";
|
2024-11-16 22:04:54 -05:00
|
|
|
|
|
|
|
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 ";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|