nix fixes

This commit is contained in:
Kyle Brown 2023-08-02 20:23:45 -07:00
parent 9701f408be
commit 252a68cf82
5 changed files with 11 additions and 2 deletions

View file

@ -14,7 +14,7 @@
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "22.05";
home.stateVersion = "23.05";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

View file

@ -75,6 +75,7 @@
libuuid # `uuidgen` (already pre-installed on mac)
ispell # doom emacs
iotop # disk top
iftop # network top
];

6
.zprofile Normal file
View file

@ -0,0 +1,6 @@
if [[ $EUID != 0 ]]; then
typeset -xT SUDO_PATH sudo_path
typeset -U sudo_path
sudo_path=({,/usr/local,/usr}/sbin(N-/))
alias sudo="sudo env PATH=\"SUDO_PATH:$PATH\""
fi

View file

@ -127,6 +127,7 @@ fi
# Docker shortcuts
if (( $+commands[docker] )); then
alias dc='docker compose '
alias dcu='docker compose up '
alias dcud='docker compose up -d '
alias dcd='docker compose down '
@ -292,7 +293,7 @@ alias mv='mv -i -v'
alias mkdir='mkdir -p -v'
alias df='df -h'
alias dd='dd status=progress bs=4M conv=fdatasync '
alias sudo='sudo ' # Makes sudo work with aliases
alias sudo='sudo env "PATH=$PATH" ' # Makes sudo work with aliases and saves path
alias ncdu='ncdu -x' # Don't cross filesystem boundries
# Shortcuts to edit common files

1
.zshrc
View file

@ -73,6 +73,7 @@ zstyle ':completion:*' cache-path ${HOME}/.zsh/cache
zstyle ':completion:*:descriptions' format '%U%F{cyan}%d%f%u'
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
zstyle ":completion:*:commands" rehash 1
zstyle ':completion:*:sudo:*' environ PATH="$SUDO_PATH:$PATH"
# If running as root and nice >0, renice to 0.
if [ "$USER" = 'root' ] && [ "$(cut -d ' ' -f 19 /proc/$$/stat)" -gt 0 ]; then