1
0
Fork 0
mirror of https://github.com/MillironX/dotfiles.git synced 2024-11-25 22:59:56 +00:00

Compare commits

...

21 commits

Author SHA1 Message Date
44b9b80d27
refactor: Update GPG conf to match Dr Duh's 2023-04-15 19:13:10 -05:00
bc153ee4d1
feat: Add local nix install hook 2023-04-15 19:11:11 -05:00
83f28d03f0
fix: Use private key to login on Windows 2023-04-15 19:01:21 -05:00
774e277e99
refactor: Simplify juliaup support 2023-04-15 18:57:24 -05:00
2bf7c0a80b
feat: Add mamba installer 2023-04-15 18:57:24 -05:00
597a4edb0f
refactor: Move antigen to chezmoiexternal 2023-04-15 18:57:23 -05:00
9813078c5e
feat: Remove n external download 2023-04-15 18:13:02 -05:00
99c8b6ec4b
refactor: Move env_parallel hooks to .hooks 2023-04-15 18:12:14 -05:00
ba3dfc5f52
refactor: Move direnv hooks to .hooks 2023-04-15 18:03:24 -05:00
85b05d50f0
feat: Add mamba hooks 2023-04-15 18:01:42 -05:00
6caa4f13ef
feat: Persist ps1 change for conda in bash 2023-04-15 18:01:23 -05:00
c416a5304b
refactor: Move conda hooks to .hooks 2023-04-15 18:01:04 -05:00
433c576a44
refactor: Replace all shell command searching with Chezmoi searching 2023-04-15 17:45:49 -05:00
f89211ef87
feat!: Remove rbenv and n hooks
I'll be using nix for those types of dependencies from now on
2023-04-15 17:45:11 -05:00
6f57123a63
feat: Add alias for codium 2023-04-15 17:19:08 -05:00
1e8b917803
refactor: Replace shell path evaluation with Chezmoi evaluation 2023-04-15 17:16:40 -05:00
7319c73820
chore: Convert .aliases to template 2023-04-15 17:11:41 -05:00
252ce21dc5
Merge branch 'master' of github.com:MillironX/dotfiles 2023-04-15 17:09:22 -05:00
1c558abfa6
feat: Add gpub alias 2023-04-15 17:09:08 -05:00
20cc498169 Merge branch 'master' of https://github.com/MillironX/dotfiles 2023-04-15 15:54:20 -05:00
d4e523271e
fix: Add whitespace back into tmux.conf 2023-04-15 15:54:11 -05:00
12 changed files with 91 additions and 138 deletions

View file

@ -1,7 +1,6 @@
[".local/bin/n"] ["antigen.zsh"]
type = "file" type = "file"
url = "https://raw.githubusercontent.com/tj/n/master/bin/n" url = "https://git.io/antigen"
executable = true
refreshPeriod = "168h" refreshPeriod = "168h"
[".local/share/fonts/meslolgs-nf-regular.ttf"] [".local/share/fonts/meslolgs-nf-regular.ttf"]

View file

@ -1,22 +1,16 @@
# Only create aliases if the underlying programs are available
# This allows portability between machines in different states
alias_if_exists () {
ALIAS=${1}
COMMAND=${2}
ARGS=${3}
if [ $(command -v $COMMAND) ]; then
if [ -n "$ARGS" ]; then
alias $ALIAS="$COMMAND $ARGS"
else
alias $ALIAS="$COMMAND"
fi
fi
}
# Context-sensitive aliases # Context-sensitive aliases
alias_if_exists bat batcat {{- if lookPath "batcat" }}
alias_if_exists cat bat alias bat=batcat
alias_if_exists ls lsd {{- end }}
{{- if or (lookPath "bat") (lookPath "batcat") }}
alias cat=bat
{{- end }}
{{- if lookPath "lsd" }}
alias ls=lsd
{{- end }}
{{- if and (lookPath "codium") (not (lookPath "code")) }}
alias code=codium
{{- end }}
# Universal aliases # Universal aliases
alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME' alias config='git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
@ -24,6 +18,7 @@ alias please='sudo $(fc -ln -1)'
alias nrun='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus="NVIDIA_only"' alias nrun='__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia __VK_LAYER_NV_optimus="NVIDIA_only"'
alias grim='git rebase -i --autosquash $(git_main_branch)' alias grim='git rebase -i --autosquash $(git_main_branch)'
alias grid='git rebase -i --autosquash $(git_develop_branch)' alias grid='git rebase -i --autosquash $(git_develop_branch)'
alias gpub='git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)'
# Alias-like functions # Alias-like functions
nd () { nd () {

View file

@ -1,2 +1,2 @@
auto_activate_base: false auto_activate_base: false
changeps1: false changeps1: true

View file

@ -1,45 +1,38 @@
{{- if lookPath "pipx" }}
# Enable pipx completions # Enable pipx completions
if [ $(command -v pipx) ]; then eval "$(register-python-argcomplete pipx)"
eval "$(register-python-argcomplete pipx)" {{- end }}
fi
{{- if lookPath "nvim" }}
# Preferred editor for local and remote sessions # Preferred editor for local and remote sessions
if [ $(command -v nvim) ]; then export EDITOR=nvim
export EDITOR=nvim {{- end }}
elif [ $(command -v nano) ]; then
export EDITOR=nano
elif [ $(command -v vim) ]; then
export EDITOR=vim
elif [ $(command -v emacs) ]; then
export EDITOR='emacs -nw'
fi
if [ $(command -v kate) ]; then {{- if lookPath "kate" }}
export VISUAL=kate export VISUAL=kate
elif [ $(command -v code) ]; then {{- else if lookPath "codium" }}
export VISUAL=code export VISUAL=codium
elif [ $(command -v emacs) ]; then {{- else if lookPath "code" }}
export VISUAL=emacs export VISUAL=code
fi {{- end }}
{{- if lookPath "most" }}
# Set a cool new pager with color support # Set a cool new pager with color support
if [ $(command -v most) ]; then export PAGER=most
export PAGER=most {{- end }}
fi
{{- if or (lookPath "bat") (lookPath "catbat") }}
# Replace cat with bat # Replace cat with bat
if [ $(command -v bat) ]; then export BAT_PAGER="less -SRF"
export BAT_PAGER="less -SRF" export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANPAGER="sh -c 'col -bx | bat -l man -p'" export MANROFFOPT="-c"
export MANROFFOPT="-c" {{- end }}
fi
# Add notification support for long-running processes # Add notification support for long-running processes
if [ $(command -v ntfy) ]; then {{- if lookPath "ntfy" }}
eval "$(ntfy shell-integration --longer-than 30)" eval "$(ntfy shell-integration --longer-than 30)"
export AUTO_NTFY_DONE_IGNORE="vim nano emacs kate zshconfig screen tmux ssh top htop less more most nethogs 'singularity shell' julia man glances" export AUTO_NTFY_DONE_IGNORE="vim nano emacs kate zshconfig screen tmux ssh top htop less more most nethogs 'singularity shell' julia man glances"
fi {{- end }}
# Set the Nextflow enviroment caches # Set the Nextflow enviroment caches
export NXF_HOME="$HOME/.nextflow" export NXF_HOME="$HOME/.nextflow"

View file

@ -1,19 +1,36 @@
if [ -f $HOME/.rbenv/bin/rbenv ]; then # >>> conda initialize >>>
export PATH="$HOME/.rbenv/bin:$PATH" # !! Contents within this block are managed by 'conda init' !!
eval "$(rbenv init -)" __conda_setup="$($HOME/miniconda3/bin/conda shell.$(basename $0) 'hook' 2> /dev/null)"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH" if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
. "$HOME/miniconda3/etc/profile.d/conda.sh"
else
export PATH="$HOME/miniconda3/bin:$PATH"
fi
fi fi
unset __conda_setup
if [ $(command -v n) ]; then if [ -f "$HOME/miniconda3/etc/profile.d/mamba.sh" ]; then
export N_PREFIX=$HOME/.n . "$HOME/miniconda3/etc/profile.d/mamba.sh"
export PATH="$HOME/.n/bin:$PATH"
fi fi
# <<< conda initialize <<<
{{- if lookPath "direnv" }}
eval "$(direnv hook $(basename $0))"
{{- end }}
if [ -f $HOME/.ion/bin/ion ]; then if [ -f $HOME/.ion/bin/ion ]; then
export PATH="$HOME/.ion/bin/ion:$PATH" export PATH="$HOME/.ion/bin/ion:$PATH"
export FPATH="$HOME/.ion/completions:$FPATH" export FPATH="$HOME/.ion/completions:$FPATH"
fi fi
# Import GNU parallel
if [ $(command -v env_parallel.$(basename $0)) ]; then
source $(which env_parallel.$(basename $0))
fi
{{- if eq .machinetype "workstation" }} {{- if eq .machinetype "workstation" }}
export GPG_TTY="$(tty)" export GPG_TTY="$(tty)"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)

View file

@ -3,22 +3,8 @@
export PATH="$HOME/.local/bin:$HOME/bin:$PATH" export PATH="$HOME/.local/bin:$HOME/bin:$PATH"
# juliaup setup # juliaup setup
if [ -d $HOME/.julia/juliaup/bin ]; then export PATH="$HOME/.julia/juliaup/bin:$PATH"
export PATH="$HOME/.julia/juliaup/bin:$PATH" export PATH="$HOME/.juliaup/bin:$PATH"
fi
# >>> juliaup initialize >>>
# !! Contents within this block are managed by juliaup !!
case ":$PATH:" in
*:/home/millironx/.juliaup/bin:*)
;;
*)
export PATH=/home/millironx/.juliaup/bin${PATH:+:${PATH}}
;;
esac
# <<< juliaup initialize <<<
# Linuxbrew setup # Linuxbrew setup
if [ -d $HOME/../linuxbrew/.linuxbrew ]; then if [ -d $HOME/../linuxbrew/.linuxbrew ]; then
@ -32,3 +18,7 @@ if [ -n "$BREWPATH" ]; then
export HOMEBREW_MAKE_JOBS=1 export HOMEBREW_MAKE_JOBS=1
export HOMEBREW_NO_ANALYTICS=1 export HOMEBREW_NO_ANALYTICS=1
fi fi
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
fi

View file

@ -1,6 +1,6 @@
set -g default-terminal "tmux-256color" set -g default-terminal "tmux-256color"
{{- if (eq .chezmoi.osRelease.id "debian") }} {{ if (eq .chezmoi.osRelease.id "debian") }}
source "/usr/share/powerline/bindings/tmux/powerline.conf" source "/usr/share/powerline/bindings/tmux/powerline.conf"
{{- else -}} {{ else }}
source "/usr/share/tmux/powerline.conf" source "/usr/share/tmux/powerline.conf"
{{- end }} {{ end }}

View file

@ -11,33 +11,7 @@ source $HOME/.hooks
# User specific aliases and functions # User specific aliases and functions
source $HOME/.aliases source $HOME/.aliases
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
. "$HOME/miniconda3/etc/profile.d/conda.sh"
else
export PATH="$HOME/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
conda config --set changeps1 true
# <<< conda initialize <<<
# >>> direnv initalize >>>
if [ $(command -v direnv) ]; then
eval "$(direnv hook bash)"
fi
# <<< direnv initalize <<<
source $HOME/.envvar source $HOME/.envvar
if [ $(command -v env_parallel.bash) ]; then
source $(which env_parallel.bash)
fi
# Make the prompt pretty, just in case we're stuck in bash land # Make the prompt pretty, just in case we're stuck in bash land
export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ " export PS1="[\[\e[32m\]\u\[\e[m\]@\[\e[33m\]\h\[\e[m\] \[\e[34m\]\W\[\e[m\]] \\$ "

View file

@ -18,9 +18,6 @@ then
fi fi
# Load the antigen library # Load the antigen library
if [[ ! -f "$HOME/antigen.zsh" ]]; then
curl -L git.io/antigen > $HOME/antigen.zsh
fi
source "$HOME/antigen.zsh" source "$HOME/antigen.zsh"
# Load the oh-my-zsh library # Load the oh-my-zsh library
@ -54,27 +51,6 @@ COMPLETION_WAITING_DOTS="true"
source $HOME/.hooks source $HOME/.hooks
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then
. "$HOME/miniconda3/etc/profile.d/conda.sh"
else
export PATH="$HOME/miniconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# >>> direnv initalize >>>
if [ $(command -v direnv) ]; then
eval "$(direnv hook zsh)"
fi
# <<< direnv initalize <<<
# Tell Antigen that you're done # Tell Antigen that you're done
antigen apply antigen apply
@ -89,11 +65,6 @@ source $HOME/.envvar
alias zshconfig="$EDITOR ~/.zshrc" alias zshconfig="$EDITOR ~/.zshrc"
source $HOME/.aliases source $HOME/.aliases
# Import GNU parallel
if [ $(command -v env_parallel.zsh) ]; then
source $(which env_parallel.zsh)
fi
{{ if or {{ if or
(eq .machinetype "workstation") (eq .machinetype "workstation")
(eq .chezmoi.osRelease.id "fedora") (eq .chezmoi.osRelease.id "fedora")

View file

@ -1,2 +1,4 @@
default-cache-ttl 10000 enable-ssh-support
max-cache-ttl 86400 ttyname $GPG_TTY
default-cache-ttl 60
max-cache-ttl 120

View file

@ -1,6 +1,6 @@
Host * Host *
IdentitiesOnly yes IdentitiesOnly yes
IdentityFile {{ if and (eq .machinetype "workstation") (ne .chezmoi.os "windows") }}~/.ssh/id_rsa_yubikey.pub{{ else }}~/.ssh/id_ed25519.pub{{ end }} IdentityFile {{ if and (eq .machinetype "workstation") (ne .chezmoi.os "windows") }}~/.ssh/id_rsa_yubikey.pub{{ else }}~/.ssh/id_ed25519{{ end }}
Host aahz Host aahz
HostName 129.130.108.37 HostName 129.130.108.37

View file

@ -0,0 +1,12 @@
#!/bin/bash
{{ if eq .chezmoi.os "linux" }}
{{ $mambaURL := print "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-pypy3-Linux-x86_64.sh" }}
{{ if lookPath "wget" }}
wget -qO- "{{ $mambaURL }}" > mamba.sh
{{ else }}
curl -L "{{ $mambaURL }}" > mamba.sh
{{ end }}
chmod +x mamba.sh
./mamba.sh -b -u -p $HOME/miniconda3
rm mamba.sh
{{ end }}