flake/nixos/zsh.nix

62 lines
1.8 KiB
Nix
Raw Normal View History

2024-11-16 13:38:09 -05:00
{ pkgs, ... }: {
# starship - an customizable prompt for any shell
#programs.starship = {
#enable = true;
# custom settings
#settings = {
#format = "$all$nix_shell$python$nodejs$lua$golang$rust$php$git_branch$git_commit$git_state$git_status\n$username$hostname$directory";
#add_newline = true;
#aws.disabled = true;
#gcloud.disabled = true;
#line_break.disabled = true;
#};
#};
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";
ohMyZsh = {
enable = true;
theme = "agnoster";
};
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 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-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";
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 ";
};
};
}