Compare commits

..

No commits in common. "052f2afe98796f4bbc91742446213353e7e68905" and "2d058bb1d94fef435d4804f9959eef3de46df4c0" have entirely different histories.

2 changed files with 90 additions and 126 deletions

52
.zshrc

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
[ ! -z "${DEBUG-}" ] && set -x set -x
cd "$(dirname $0)" || exit 1 cd "$(dirname $0)" || exit 1
if ! pgrep nix-daemon > /dev/null 2>&1 ; then if ! pgrep nix-daemon ; then
sh < $(curl -L https://nixos.org/nix/install) sh <(curl -L https://nixos.org/nix/install)
fi fi
mkdir -p "$HOME/.config" mkdir -p "$HOME/.config"
@ -18,72 +18,68 @@ if [ ! -f "$HOME/.config/nix/nix.conf" ] ; then
cachix use devenv cachix use devenv
fi fi
function has_bin() { nix profile install nixpkgs#bashInteractive
[ -e "$HOME/.nix-profile/bin/$1" ] nix profile install nixpkgs#bat
} nix profile install nixpkgs#bitwarden-cli
nix profile install nixpkgs#broot
has_bin "bash" || nix profile install nixpkgs#bashInteractive nix profile install nixpkgs#cargo-dist
has_bin "bat" || nix profile install nixpkgs#bat nix profile install nixpkgs#cargo-flamegraph
has_bin "bw" || nix profile install nixpkgs#bitwarden-cli nix profile install nixpkgs#cargo-release
has_bin "broot" || nix profile install nixpkgs#broot nix profile install nixpkgs#cargo-udeps
has_bin "cargo-dist" || nix profile install nixpkgs#cargo-dist nix profile install nixpkgs#cheat
has_bin "cargo-flamegraph" || nix profile install nixpkgs#cargo-flamegraph nix profile install nixpkgs#chezmoi
has_bin "cargo-release" || nix profile install nixpkgs#cargo-release nix profile install nixpkgs#croc
has_bin "cargo-udeps" || nix profile install nixpkgs#cargo-udeps nix profile install nixpkgs#curlie
has_bin "cheat" || nix profile install nixpkgs#cheat nix profile install nixpkgs#delta
has_bin "chezmoi" || nix profile install nixpkgs#chezmoi nix profile install nixpkgs#direnv
has_bin "croc" || nix profile install nixpkgs#croc nix profile install nixpkgs#dnsproxy
has_bin "curlie" || nix profile install nixpkgs#curlie nix profile install nixpkgs#du-dust
has_bin "delta" || nix profile install nixpkgs#delta nix profile install nixpkgs#fd
has_bin "direnv" || nix profile install nixpkgs#direnv nix profile install nixpkgs#flamegraph
has_bin "dnsproxy" || nix profile install nixpkgs#dnsproxy nix profile install nixpkgs#fzf
has_bin "dust" || nix profile install nixpkgs#du-dust nix profile install nixpkgs#git
has_bin "fd" || nix profile install nixpkgs#fd nix profile install nixpkgs#git-gone
has_bin "flamegraph" || nix profile install nixpkgs#flamegraph nix profile install nixpkgs#gnugrep
has_bin "fzf" || nix profile install nixpkgs#fzf nix profile install nixpkgs#grex
has_bin "git" || nix profile install nixpkgs#git nix profile install nixpkgs#gron
has_bin "git-gone" || nix profile install nixpkgs#git-gone nix profile install nixpkgs#gum
has_bin "grep" || nix profile install nixpkgs#gnugrep nix profile install nixpkgs#helix
has_bin "grex" || nix profile install nixpkgs#grex nix profile install nixpkgs#hexyl
has_bin "gron" || nix profile install nixpkgs#gron nix profile install nixpkgs#htop
has_bin "gum" || nix profile install nixpkgs#gum nix profile install nixpkgs#httpie
has_bin "hx" || nix profile install nixpkgs#helix nix profile install nixpkgs#htmlq
has_bin "hexyl" || nix profile install nixpkgs#hexyl nix profile install nixpkgs#hyperfine
has_bin "htop" || nix profile install nixpkgs#htop nix profile install nixpkgs#jc
has_bin "httpie" || nix profile install nixpkgs#httpie nix profile install nixpkgs#jiq
has_bin "htmlq" || nix profile install nixpkgs#htmlq nix profile install nixpkgs#jq
has_bin "hyperfine" || nix profile install nixpkgs#hyperfine nix profile install nixpkgs#jqp
has_bin "jc" || nix profile install nixpkgs#jc nix profile install nixpkgs#kibi
has_bin "jiq" || nix profile install nixpkgs#jiq nix profile install nixpkgs#kondo
has_bin "jq" || nix profile install nixpkgs#jq nix profile install nixpkgs#kubie
has_bin "jqp" || nix profile install nixpkgs#jqp nix profile install nixpkgs#llama
has_bin "kibi" || nix profile install nixpkgs#kibi nix profile install nixpkgs#mdbook
has_bin "kondo" || nix profile install nixpkgs#kondo nix profile install nixpkgs#mosh
has_bin "kubie" || nix profile install nixpkgs#kubie nix profile install nixpkgs#neovim
has_bin "llama" || nix profile install nixpkgs#llama nix profile install nixpkgs#ouch
has_bin "mdbook" || nix profile install nixpkgs#mdbook
has_bin "mosh" || nix profile install nixpkgs#mosh
has_bin "nvim" || nix profile install nixpkgs#neovim
has_bin "ouch" || nix profile install nixpkgs#ouch
#nix profile install nixpkgs#prettylist #nix profile install nixpkgs#prettylist
has_bin "q" || nix profile install nixpkgs#q nix profile install nixpkgs#q
has_bin "rg" || nix profile install nixpkgs#ripgrep nix profile install nixpkgs#ripgrep
has_bin "rq" || jnix profile install nixpkgs#rq nix profile install nixpkgs#rq
has_bin "rustfilt" || nix profile install nixpkgs#rustfilt nix profile install nixpkgs#rustfilt
has_bin "sd" || nix profile install nixpkgs#sd nix profile install nixpkgs#sd
has_bin "shellcheck" || nix profile install nixpkgs#shellcheck nix profile install nixpkgs#shellcheck
has_bin "shfmt" || nix profile install nixpkgs#shfmt nix profile install nixpkgs#shfmt
has_bin "starship" || nix profile install nixpkgs#starship nix profile install nixpkgs#starship
has_bin "tldr" || nix profile install nixpkgs#tealdeer nix profile install nixpkgs#tealdeer
has_bin "tokei" || nix profile install nixpkgs#tokei nix profile install nixpkgs#tokei
has_bin "upterm" || nix profile install nixpkgs#upterm nix profile install nixpkgs#upterm
has_bin "vim" || nix profile install nixpkgs#vim nix profile install nixpkgs#vim
has_bin "watchexec" || nix profile install nixpkgs#watchexec nix profile install nixpkgs#watchexec
has_bin "xcp" || nix profile install nixpkgs#xcp nix profile install nixpkgs#xcp
has_bin "xh" || nix profile install nixpkgs#xh nix profile install nixpkgs#xh
has_bin "xsv" || nix profile install nixpkgs#xsv nix profile install nixpkgs#xsv
has_bin "zola" || nix profile install nixpkgs#zola nix profile install nixpkgs#zola
has_bin "zoxide" || nix profile install nixpkgs#zoxide nix profile install nixpkgs#zoxide
if [ ! -e /Applications/kitty.app ] ; then if [ ! -e /Applications/kitty.app ] ; then
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
@ -111,12 +107,12 @@ include current-theme.conf
# END_KITTY_THEME # END_KITTY_THEME
EOF EOF
curl -sw '%{url_effective}\n' -Lo "$HOME/.config/kitty/current-theme.conf" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/kitty/current-theme.conf curl -Lo "$HOME/.config/kitty/current-theme.conf" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/kitty/current-theme.conf
curl -sw '%{url_effective}\n' -Lo "$HOME/.config/starship.toml" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/starship.toml curl -Lo "$HOME/.config/starship.toml" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/starship.toml
mkdir -p "$HOME/.config/helix" mkdir -p "$HOME/.config/helix"
curl -sw '%{url_effective}\n' -Lo "$HOME/.config/helix/config.toml" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/helix/config.toml curl -Lo "$HOME/.config/helix/config.toml" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_config/helix/config.toml
cat <<EOF > "$HOME/.gitconfig" cat <<EOF > "$HOME/.gitconfig"
[push] [push]
@ -196,27 +192,7 @@ 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 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --no-modify-path --default-toolchain stable --profile complete -y
fi fi
curl -sw '%{url_effective}\n' -Lo "$HOME/.tmux.conf" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_tmux.conf curl -Lo "$HOME/.tmux.conf" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_tmux.conf
curl -sw '%{url_effective}\n' -Lo "$HOME/.vimrc" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_vimrc curl -Lo "$HOME/.vimrc" https://git.penguincoder.org/penguincoder/dotfiles/raw/branch/main/dot_vimrc
install -m 640 ./.zshrc "$HOME/" install -m 640 ./.zshrc "$HOME/"
AUTO_FILE="$HOME/.zshrc.auto"
echo > "$AUTO_FILE"
PATH="$PATH:$HOME/.nix-profile/bin"
atuin init zsh >> "$AUTO_FILE"
direnv hook zsh >> "$AUTO_FILE"
just --completions zsh >> "$AUTO_FILE"
starship init zsh >> "$AUTO_FILE"
zoxide init zsh >> "$AUTO_FILE"
[ -d /usr/local/bin ] || sudo mkdir /usr/local/bin
function install_typst() {
echo "manually installing typst"
curl -sLO https://github.com/typst/typst/releases/download/22-03-21-2/typst-x86_64-apple-darwin.tar.gz
ouch d typst*.tar.gz
sudo install -m 755 typst*/typst /usr/local/bin/
rm -rf ./typst*
}
[ -e "/usr/local/bin/typst" ] || install_typst