130 lines
2.9 KiB
Nix
130 lines
2.9 KiB
Nix
# Set up the user's prompt as ZSH, Starship and some useful utilities
|
|
{ pkgs, ... }:
|
|
{
|
|
|
|
imports = [
|
|
./uutils.nix
|
|
];
|
|
|
|
# These are all the sort of shell commands that we want available whereever
|
|
# there is shell. These include just a lot of useful utilities for managing
|
|
# a system or working with other shell commands. Packages more specific to
|
|
# development can be in development configs.
|
|
home.packages = with pkgs; [
|
|
# System
|
|
htop
|
|
btop
|
|
neofetch
|
|
killall
|
|
|
|
# Files
|
|
zip
|
|
xz
|
|
unzip
|
|
p7zip
|
|
file
|
|
tree
|
|
yazi # File manager
|
|
ueberzugpp # for image previews
|
|
w3m # terminal browser for image previews
|
|
dysk # better disk info
|
|
ripgrep # better grep
|
|
fd # Better find
|
|
bat # cat with wings
|
|
eza # Modern replacement for ls
|
|
dust # More intuitive du
|
|
dua # Interactive disk usage analyzer
|
|
|
|
# Networking
|
|
dnsutils
|
|
inetutils
|
|
socat
|
|
xh
|
|
|
|
# devices
|
|
usbutils
|
|
|
|
# Other
|
|
jq
|
|
|
|
];
|
|
|
|
home.shellAliases = {
|
|
"p?" = "ps ax | grep";
|
|
# Dysk is basically just better.
|
|
"df" = "echo 'Don't you want `dysk`?'";
|
|
"grep" = "echo 'Don't you want `rg`?'";
|
|
"find" = "echo 'Don't you want `fd`?'";
|
|
"cat" = "bat";
|
|
"ls" = "eza";
|
|
"http" = "echo 'Don't you want `xh`?'";
|
|
"du" = "echo 'Don't you want `dust` or `dua`?'";
|
|
"ranger" = "echo 'Don't you want `yazi`?'";
|
|
};
|
|
|
|
programs.zsh = {
|
|
enable = true;
|
|
envExtra = ''
|
|
PATH=$PATH:$HOME/.local/bin
|
|
GITHUB_USERNAME=periodic
|
|
'';
|
|
initContent = ''
|
|
# Make ^U work like it does in Bash
|
|
bindkey "^U" backward-kill-line
|
|
|
|
# This doesn't seem to be in the homemanager options
|
|
# Makes shells incrementally append history so that new shells have the history of open shells
|
|
setopt inc_append_history
|
|
'';
|
|
|
|
history = {
|
|
# Do not share history between sessions.
|
|
share = false;
|
|
};
|
|
|
|
oh-my-zsh = {
|
|
enable = true;
|
|
plugins = [
|
|
"git"
|
|
"git-prompt"
|
|
"direnv"
|
|
"sudo"
|
|
];
|
|
};
|
|
|
|
plugins = [
|
|
{
|
|
name = "zsh-autosuggestions";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "zsh-users";
|
|
repo = "zsh-autosuggestions";
|
|
rev = "0e810e5afa27acbd074398eefbe28d13005dbc15";
|
|
hash = "sha256-85aw9OM2pQPsWklXjuNOzp9El1MsNb+cIiZQVHUzBnk=";
|
|
};
|
|
}
|
|
{
|
|
name = "zsh-syntax-highlighting";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "zsh-users";
|
|
repo = "zsh-syntax-highlighting";
|
|
rev = "5eb677bb0fa9a3e60f0eff031dc13926e093df92";
|
|
hash = "sha256-KRsQEDRsJdF7LGOMTZuqfbW6xdV5S38wlgdcCM98Y/Q=";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
programs.zoxide = {
|
|
# TODO: Learn all the capabilities of zoxide and use them.
|
|
enable = true;
|
|
enableZshIntegration = true;
|
|
};
|
|
|
|
programs.starship = {
|
|
enable = true;
|
|
settings = {
|
|
add_newline = true;
|
|
};
|
|
};
|
|
}
|