use nix for all tools, add more initialization to zshrc

main
Andrew Coleman 2023-03-22 08:59:25 -04:00
parent 9b4721c7b1
commit 2d058bb1d9
2 changed files with 95 additions and 29 deletions

16
.zshrc
View File

@ -67,3 +67,19 @@ case ":${PATH}:" in
;;
esac
# llama keybindings
# | Key binding | Description |
# |------------------|--------------------|
# | `Arrows`, `hjkl` | Move cursor |
# | `Enter` | Enter directory |
# | `Backspace` | Exit directory |
# | `Space` | Toggle preview |
# | `Esc` | Exit with cd |
# | `Ctrl+C` | Exit without cd |
# | `/` | Fuzzy search |
# | `dd` | Delete file or dir |
function ll {
cd "$(llama "$@")"
}
alias http_server="python3 -m http.server"

View File

@ -1,31 +1,85 @@
#!/bin/sh
set -x
cd "$(dirname $0)" || exit 1
if ! pgrep nix-daemon ; then
sh <(curl -L https://nixos.org/nix/install)
fi
mkdir -p "$HOME/.config"
mkdir -p "$HOME/.config/nix"
if [ ! -f "$HOME/.config/nix/nix.conf" ] ; then
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
echo "trusted-users = root andrew" | sudo tee -a /etc/nix/nix.conf && sudo pkill nix-daemon
nix profile install nixpkgs#cachix
cachix use devenv
fi
nix profile install nixpkgs#chezmoi
nix profile install nixpkgs#direnv
nix profile install nixpkgs#zoxide
nix profile install nixpkgs#htop
nix profile install nixpkgs#fzf
nix profile install nixpkgs#vim
nix profile install nixpkgs#git
nix profile install nixpkgs#helix
nix profile install nixpkgs#du-dust
nix profile install nixpkgs#bat
nix profile install nixpkgs#delta
nix profile install nixpkgs#starship
nix profile install nixpkgs#gnugrep
nix profile install nixpkgs#ripgrep
nix profile install nixpkgs#upterm
nix profile install nixpkgs#mosh
nix profile install nixpkgs#bashInteractive
nix profile install nixpkgs#bat
nix profile install nixpkgs#bitwarden-cli
nix profile install nixpkgs#broot
nix profile install nixpkgs#cargo-dist
nix profile install nixpkgs#cargo-flamegraph
nix profile install nixpkgs#cargo-release
nix profile install nixpkgs#cargo-udeps
nix profile install nixpkgs#cheat
nix profile install nixpkgs#chezmoi
nix profile install nixpkgs#croc
nix profile install nixpkgs#curlie
nix profile install nixpkgs#delta
nix profile install nixpkgs#direnv
nix profile install nixpkgs#dnsproxy
nix profile install nixpkgs#du-dust
nix profile install nixpkgs#fd
nix profile install nixpkgs#flamegraph
nix profile install nixpkgs#fzf
nix profile install nixpkgs#git
nix profile install nixpkgs#git-gone
nix profile install nixpkgs#gnugrep
nix profile install nixpkgs#grex
nix profile install nixpkgs#gron
nix profile install nixpkgs#gum
nix profile install nixpkgs#helix
nix profile install nixpkgs#hexyl
nix profile install nixpkgs#htop
nix profile install nixpkgs#httpie
nix profile install nixpkgs#htmlq
nix profile install nixpkgs#hyperfine
nix profile install nixpkgs#jc
nix profile install nixpkgs#jiq
nix profile install nixpkgs#jq
nix profile install nixpkgs#jqp
nix profile install nixpkgs#kibi
nix profile install nixpkgs#kondo
nix profile install nixpkgs#kubie
nix profile install nixpkgs#llama
nix profile install nixpkgs#mdbook
nix profile install nixpkgs#mosh
nix profile install nixpkgs#neovim
nix profile install nixpkgs#ouch
#nix profile install nixpkgs#prettylist
nix profile install nixpkgs#q
nix profile install nixpkgs#ripgrep
nix profile install nixpkgs#rq
nix profile install nixpkgs#rustfilt
nix profile install nixpkgs#sd
nix profile install nixpkgs#shellcheck
nix profile install nixpkgs#shfmt
nix profile install nixpkgs#starship
nix profile install nixpkgs#tealdeer
nix profile install nixpkgs#tokei
nix profile install nixpkgs#upterm
nix profile install nixpkgs#vim
nix profile install nixpkgs#watchexec
nix profile install nixpkgs#xcp
nix profile install nixpkgs#xh
nix profile install nixpkgs#xsv
nix profile install nixpkgs#zola
nix profile install nixpkgs#zoxide
if [ ! -e /Applications/kitty.app ] ; then
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
@ -60,13 +114,7 @@ curl -Lo "$HOME/.config/starship.toml" https://git.penguincoder.org/penguincoder
mkdir -p "$HOME/.config/helix"
curl -Lo "$HOME/.config/helix/config.toml" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/helix/config.toml
mkdir -p "$HOME/.config/git"
curl -Lo "$HOME/.config/git/delta.gitconfig" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/git/delta.gitconfig
cat <<EOF > "$HOME/.gitconfig"
[include]
path = /Users/andrew/.config/git/delta.gitconfig
[push]
default = simple
@ -87,13 +135,13 @@ cat <<EOF > "$HOME/.gitconfig"
defaultBranch = main
[delta]
line-numbers = true
#line-numbers-zero-style = white
line-numbers-minus-style = bold red
line-numbers-plus-style = bold green
file-style = omit
hunk-header-style = file
syntax-theme = OneHalfLight
line-numbers = true
#line-numbers-zero-style = white
line-numbers-minus-style = bold red
line-numbers-plus-style = bold green
file-style = omit
hunk-header-style = file
syntax-theme = OneHalfLight
[rebase]
autoStash = true
@ -146,3 +194,5 @@ fi
curl -Lo "$HOME/.tmux.conf" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_tmux.conf
curl -Lo "$HOME/.vimrc" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_vimrc
install -m 640 ./.zshrc "$HOME/"