126 lines
5.8 KiB
Bash
Executable File
126 lines
5.8 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
[ -n "${DEBUG-}" ] && set -x
|
|
|
|
cd "$(dirname "$0")" || exit 1
|
|
|
|
shellcheck "$0" || exit 1
|
|
shfmt -i 2 -d -s "$0"
|
|
|
|
has_bin() {
|
|
[ -e "$HOME/.nix-profile/bin/$1" ]
|
|
}
|
|
|
|
if ! pgrep nix-daemon >/dev/null 2>&1; then
|
|
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
|
# shellcheck disable=SC1091
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
|
# shellcheck disable=SC1091
|
|
. /nix/var/nix/profiles/default/etc/profile.d/nix.sh
|
|
else
|
|
echo "Attempting nix upgrade... may prompt for sudo password"
|
|
sudo nix upgrade-nix
|
|
fi
|
|
|
|
PATH="$PATH:$HOME/.nix-profile/bin"
|
|
|
|
has_bin "cachix" || nix profile install nixpkgs#cachix
|
|
if ! has_bin "devenv"; then
|
|
cachix use devenv
|
|
nix profile install --accept-flake-config github:cachix/devenv/latest
|
|
fi
|
|
|
|
if [ ! -d "$HOME/.cargo" ]; then
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain stable --profile complete -y
|
|
fi
|
|
|
|
has_bin "atuin" || nix profile install nixpkgs#atuin
|
|
has_bin "bash" || nix profile install nixpkgs#bashInteractive
|
|
has_bin "bat" || nix profile install nixpkgs#bat
|
|
has_bin "bw" || nix profile install nixpkgs#bitwarden-cli
|
|
has_bin "broot" || nix profile install nixpkgs#broot
|
|
has_bin "cargo-dist" || nix profile install nixpkgs#cargo-dist
|
|
has_bin "cargo-flamegraph" || nix profile install nixpkgs#cargo-flamegraph
|
|
has_bin "cargo-release" || nix profile install nixpkgs#cargo-release
|
|
has_bin "cargo-udeps" || nix profile install nixpkgs#cargo-udeps
|
|
has_bin "cheat" || nix profile install nixpkgs#cheat
|
|
has_bin "chezmoi" || nix profile install nixpkgs#chezmoi
|
|
has_bin "croc" || nix profile install nixpkgs#croc
|
|
has_bin "curlie" || nix profile install nixpkgs#curlie
|
|
has_bin "dbmate" || nix profile install nixpkgs#dbmate
|
|
has_bin "delta" || nix profile install nixpkgs#delta
|
|
[ -e "$HOME/.cargo/bin/ddbug" ] || cargo install --git https://github.com/gimli-rs/ddbug
|
|
has_bin "difft" || nix profile install nixpkgs#difftastic
|
|
has_bin "direnv" || nix profile install nixpkgs#direnv
|
|
has_bin "dnsproxy" || nix profile install nixpkgs#dnsproxy
|
|
has_bin "dust" || nix profile install nixpkgs#du-dust
|
|
has_bin "eza" || nix profile install nixpkgs#eza
|
|
has_bin "fd" || nix profile install nixpkgs#fd
|
|
has_bin "flake-checker" || nix profile install github:DeterminateSystems/flake-checker
|
|
has_bin "flamegraph" || nix profile install nixpkgs#flamegraph
|
|
has_bin "fx" || nix profile install nixpkgs#fx
|
|
has_bin "fzf" || nix profile install nixpkgs#fzf
|
|
has_bin "git" || nix profile install nixpkgs#git
|
|
has_bin "git-gone" || nix profile install nixpkgs#git-gone
|
|
has_bin "goawk" || nix profile install nixpkgs#goawk
|
|
has_bin "grep" || nix profile install nixpkgs#gnugrep
|
|
has_bin "grex" || nix profile install nixpkgs#grex
|
|
has_bin "gron" || nix profile install nixpkgs#gron
|
|
has_bin "gum" || nix profile install nixpkgs#gum
|
|
has_bin "helix" || nix profile install nixpkgs#helix
|
|
has_bin "hexyl" || nix profile install nixpkgs#hexyl
|
|
has_bin "htop" || nix profile install nixpkgs#htop
|
|
has_bin "httpie" || nix profile install nixpkgs#httpie
|
|
has_bin "htmlq" || nix profile install nixpkgs#htmlq
|
|
has_bin "hyperfine" || nix profile install nixpkgs#hyperfine
|
|
has_bin "jc" || nix profile install nixpkgs#jc
|
|
has_bin "jiq" || nix profile install nixpkgs#jiq
|
|
has_bin "jo" || nix profile install nixpkgs#jo
|
|
has_bin "jq" || nix profile install nixpkgs#jq
|
|
has_bin "jqp" || nix profile install nixpkgs#jqp
|
|
has_bin "just" || nix profile install nixpkgs#just
|
|
has_bin "kibi" || nix profile install nixpkgs#kibi
|
|
has_bin "kondo" || nix profile install nixpkgs#kondo
|
|
has_bin "kubie" || nix profile install nixpkgs#kubie
|
|
has_bin "llama" || nix profile install nixpkgs#llama
|
|
has_bin "mdbook" || nix profile install nixpkgs#mdbook
|
|
has_bin "mosh" || nix profile install nixpkgs#mosh
|
|
has_bin "nix-bisect" || nix profile install nixpkgs#nix-bisect
|
|
# fails for some odd reason at the moment
|
|
#has_bin "nix-doc" || nix profile install nixpkgs#nix-doc
|
|
command -v "nix-doc" >/dev/null || cargo install nix-doc
|
|
has_bin "nix-init" || nix profile install nixpkgs#nix-init
|
|
has_bin "nix-search" || nix profile install github:peterldowns/nix-search-cli --refresh
|
|
has_bin "nurl" || nix profile install nixpkgs#nurl
|
|
has_bin "nvim" || nix profile install nixpkgs#neovim
|
|
has_bin "ouch" || nix profile install nixpkgs#ouch
|
|
has_bin "pstree" || nix profile install nixpkgs#pstree
|
|
#nix profile install nixpkgs#prettylist
|
|
has_bin "q" || nix profile install nixpkgs#q
|
|
has_bin "rg" || nix profile install nixpkgs#ripgrep
|
|
has_bin "rq" || nix profile install nixpkgs#rq
|
|
has_bin "rustfilt" || nix profile install nixpkgs#rustfilt
|
|
has_bin "sd" || nix profile install nixpkgs#sd
|
|
has_bin "shellcheck" || nix profile install nixpkgs#shellcheck
|
|
has_bin "shfmt" || nix profile install nixpkgs#shfmt
|
|
has_bin "spacer" || nix profile install nixpkgs#spacer
|
|
has_bin "starship" || nix profile install nixpkgs#starship
|
|
has_bin "terminal-notifier" || nix profile install nixpkgs#terminal-notifier
|
|
has_bin "tig" || nix profile install nixpkgs#tig
|
|
has_bin "tldr" || nix profile install nixpkgs#tealdeer
|
|
has_bin "tokei" || nix profile install nixpkgs#tokei
|
|
has_bin "typst" || nix profile install nixpkgs#typst
|
|
has_bin "typstfmt" || nix profile install nixpkgs#typstfmt
|
|
has_bin "typst-lsp" || nix profile install nixpkgs#typst-lsp
|
|
has_bin "typst-live" || nix profile install nixpkgs#typst-live
|
|
has_bin "typst-preview" || nix profile install nixpkgs#typst-preview
|
|
has_bin "upterm" || nix profile install nixpkgs#upterm
|
|
has_bin "vim" || nix profile install nixpkgs#vim
|
|
has_bin "watchexec" || nix profile install nixpkgs#watchexec
|
|
has_bin "xcp" || nix profile install nixpkgs#xcp
|
|
has_bin "xh" || nix profile install nixpkgs#xh
|
|
has_bin "xsv" || nix profile install nixpkgs#xsv
|
|
has_bin "zenith" || nix profile install nixpkgs#zenith
|
|
has_bin "zola" || nix profile install nixpkgs#zola
|
|
has_bin "zoxide" || nix profile install nixpkgs#zoxide
|