Add syncthing service and updates to fish for titan
This commit is contained in:
160
bash/.bashrc
160
bash/.bashrc
@ -1,160 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#####################
|
||||
# Path to the bash it configuration
|
||||
export BASH_IT="${HOME}/.bash_it"
|
||||
|
||||
# Lock and Load a custom theme file
|
||||
# location /.bash_it/themes/
|
||||
export BASH_IT_THEME='demula'
|
||||
|
||||
# (Advanced): Change this to the name of your remote repo if you
|
||||
# cloned bash-it with a remote other than origin such as `bash-it`.
|
||||
# export BASH_IT_REMOTE='bash-it'
|
||||
|
||||
# Your place for hosting Git repos. I use this for private repos.
|
||||
export GIT_HOSTING='git@git.domain.com'
|
||||
|
||||
# Don't check mail when opening terminal.
|
||||
unset MAILCHECK
|
||||
|
||||
# Change this to your console based IRC client of choice.
|
||||
export IRC_CLIENT='irssi'
|
||||
|
||||
# Set this to false to turn off version control status checking within the prompt for all themes
|
||||
export SCM_CHECK=false
|
||||
|
||||
# Set Xterm/screen/Tmux title with only a short hostname.
|
||||
# Uncomment this (or set SHORT_HOSTNAME to something else),
|
||||
# Will otherwise fall back on $HOSTNAME.
|
||||
export SHORT_HOSTNAME=$(hostname -s)
|
||||
|
||||
# Set Xterm/screen/Tmux title with only a short username.
|
||||
# Uncomment this (or set SHORT_USER to something else),
|
||||
# Will otherwise fall back on $USER.
|
||||
export SHORT_USER=${USER:0:8}
|
||||
|
||||
# Set Xterm/screen/Tmux title with shortened command and directory.
|
||||
# Uncomment this to set.
|
||||
#export SHORT_TERM_LINE=true
|
||||
|
||||
# Set vcprompt executable path for scm advance info in prompt (demula theme)
|
||||
# https://github.com/djl/vcprompt
|
||||
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
|
||||
|
||||
# (Advanced): Uncomment this to make Bash-it reload itself automatically
|
||||
# after enabling or disabling aliases, plugins, and completions.
|
||||
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
|
||||
|
||||
# Uncomment this to make Bash-it create alias reload.
|
||||
# export BASH_IT_RELOAD_LEGACY=1
|
||||
|
||||
# Load Bash It
|
||||
source "$BASH_IT"/bash_it.sh
|
||||
# DONE WITH BASH_IT, setup other things
|
||||
|
||||
#This bashrc file requires:
|
||||
#
|
||||
# * direnv
|
||||
# * nvm
|
||||
# * rbenv
|
||||
|
||||
######################
|
||||
command_exists () {
|
||||
type "$1" &> /dev/null ;
|
||||
}
|
||||
|
||||
if command_exists rbenv ; then
|
||||
eval "$(rbenv init -)"
|
||||
fi
|
||||
|
||||
export HUGO_BASE_DIR='~/sites/onec.me/'
|
||||
export COMPOSE_API_VERSION=1.23
|
||||
export TERM=screen-256color
|
||||
export GTAGSLABEL=pygments
|
||||
export PYENV_VERSION=3.6.6
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
# GO
|
||||
export GOPATH=$HOME/.golang
|
||||
export PATH="/usr/local/bin:/usr/local/sbin:$PATH:${GOPATH//://bin:}/bin:$HOME/.local/bin:$PATH"
|
||||
|
||||
# NVM
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
export PATH="./node_modules/.bin:$PATH"
|
||||
alias e='emacsclient --no-wait'
|
||||
|
||||
# PLAN9
|
||||
export PLAN9=/usr/local/plan9 export PLAN9
|
||||
export PATH=$PATH:$PLAN9/bin export PATH
|
||||
|
||||
# RVM
|
||||
export PATH="$PATH:$HOME/.rvm/bin"
|
||||
|
||||
export DOCKER_HOST='unix:///var/run/docker.sock'
|
||||
|
||||
# Required to re-write python binary paths with pyenv
|
||||
if command -v pyenv 1>/dev/null 2>&1; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
|
||||
djsrv() { python manage.py runserver 0.0.0.0:8000; }
|
||||
djcel() { celery -A summon_platform worker; }
|
||||
djsh() { python manage.py shell $1; }
|
||||
djshp() { python manage.py shell_plus $1; }
|
||||
|
||||
vr() { vault read -field=value secret/$1 | pbcopy; }
|
||||
vw() { vault write secret/$1 value="$2" username="$3"; }
|
||||
vrl() { vault read -field=value secret/$1 | xclip -sel clip; }
|
||||
vrll() { vault read -field=value secret/$1; }
|
||||
|
||||
passp () { pass -c personal/$1; }
|
||||
passe () { pass -c elation/$1; }
|
||||
|
||||
#alias checkmail="notmuch search --output=files tag:deleted | tr '\n' '\0' | xargs -0 -L 1 rm && notmuch new && mbsync -Va && notmuch new"
|
||||
#alias el8awslogin="eval $(aws ecr get-login --no-include-email --region us-west-1)"
|
||||
|
||||
# Elixir version manager
|
||||
test -s "$HOME/.kiex/scripts/kiex" && source "$HOME/.kiex/scripts/kiex"
|
||||
|
||||
# Vault things
|
||||
export VAULT_ADDR='https://vault.onec.me:8200'
|
||||
alias vault-token="curl https://www.onec.me/info/vault.txt | keybase pgp decrypt -m"
|
||||
alias view-sealant="curl https://www.onec.me/info/sealant.txt" # | keybase pgp decrypt -m"
|
||||
gen-new-token() { keybase pgp encrypt -m "$(vault token create -policy=admins -display-name="Colin Powell" -field token)" secstate; }
|
||||
|
||||
alias wanip='dig +short myip.opendns.com @resolver1.opendns.com'
|
||||
alias sshome='ssh $(curl -L www.onec.me/wanip)'
|
||||
|
||||
alias rchunk='brew services restart chunkwm'
|
||||
|
||||
# Maximum number of history lines in memory
|
||||
export HISTSIZE=50000
|
||||
# Maximum number of history lines on disk
|
||||
export HISTFILESIZE=50000
|
||||
# Ignore duplicate lines
|
||||
export HISTCONTROL=ignoredups:erasedups:ignorespace
|
||||
# When the shell exits, append to the history file
|
||||
# instead of overwriting it
|
||||
shopt -s histappend
|
||||
# After each command, append to the history file
|
||||
# and reread it
|
||||
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
|
||||
|
||||
# Elation specific
|
||||
el8sh() { pushd ~/devel/elationemr/hippo && docker-compose exec hippo /bin/bash -c 'cd /opt/hippo; exec "/bin/bash"'; popd; }
|
||||
el8build() { pushd ~/devel/elationemr/hippo && docker-compose exec webpack make clean && docker-compose exec webpack nvm use default && make deps; popd; }
|
||||
el8start() { pushd ~/devel/elationemr/hippo && docker-compose up -d; popd; }
|
||||
el8stop() { pushd ~/devel/elationemr/hippo && docker-compose down; popd; }
|
||||
el8logs() { pushd ~/devel/elationemr/hippo && docker-compose logs --tail 20 -f hippo; popd; }
|
||||
el8clogs() { pushd ~/devel/elationemr/hippo && docker-compose logs --tail 20 -f celery; popd; }
|
||||
|
||||
alias evpn="sudo openvpn --config ~/Nextcloud/elation.ovpn"
|
||||
alias pvpn="sudo openvpn --config ~/Nextcloud/protonvpn.ovpn"
|
||||
|
||||
|
||||
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
|
||||
@ -1,6 +1,8 @@
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
;; Copy me to ~/.doom.d/init.el or ~/.config/doom/init.el, then edit me!
|
||||
|
||||
(advice-add #'doom--refresh-pkg-contents :override #'package-refresh-contents)
|
||||
|
||||
(doom! :completion
|
||||
company ; the ultimate code completion backend
|
||||
;(helm +fuzzy)
|
||||
|
||||
@ -1 +0,0 @@
|
||||
fisher copy-user-key-bindings
|
||||
@ -1,4 +1,3 @@
|
||||
thefuck --alias | source
|
||||
source ~/.asdf/asdf.fish
|
||||
set PATH ~/.fzf/bin $PATH
|
||||
fzf_key_bindings
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
# set -g theme_display_user ssh
|
||||
# set -g theme_display_hostname ssh
|
||||
# set -g theme_display_vi no
|
||||
# set -g theme_display_nvm yes
|
||||
# set -g theme_avoid_ambiguous_glyphs yes
|
||||
# set -g theme_powerline_fonts no
|
||||
# set -g theme_nerd_fonts yes
|
||||
@ -578,10 +579,7 @@ function __bobthefish_prompt_docker -S -d 'Display Docker machine name'
|
||||
echo -ns $DOCKER_MACHINE_NAME ' '
|
||||
end
|
||||
|
||||
function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context'
|
||||
[ "$theme_display_k8s_context" = 'yes' ]
|
||||
or return
|
||||
|
||||
function __bobthefish_k8s_context -S -d 'Get the current k8s context'
|
||||
set -l config_paths "$HOME/.kube/config"
|
||||
[ -n "$KUBECONFIG" ]
|
||||
and set config_paths (string split ':' "$KUBECONFIG") $config_paths
|
||||
@ -594,14 +592,36 @@ function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context'
|
||||
if [ "$key" = 'current-context:' ]
|
||||
set -l context (string trim -c '"\' ' -- $val)
|
||||
[ -z "$context" ]
|
||||
and return
|
||||
and return 1
|
||||
|
||||
__bobthefish_start_segment $color_k8s
|
||||
echo -ns $context ' '
|
||||
echo $context
|
||||
return
|
||||
end
|
||||
end <$file
|
||||
end
|
||||
|
||||
return 1
|
||||
end
|
||||
|
||||
function __bobthefish_k8s_namespace -S -d 'Get the current k8s namespace'
|
||||
kubectl config view --minify --output "jsonpath={..namespace}"
|
||||
end
|
||||
|
||||
function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context'
|
||||
[ "$theme_display_k8s_context" = 'yes' ]
|
||||
or return
|
||||
|
||||
set -l context (__bobthefish_k8s_context)
|
||||
or return
|
||||
|
||||
set -l namespace (__bobthefish_k8s_namespace)
|
||||
|
||||
set -l segment $k8s_glyph " " $context
|
||||
[ -n "$namespace" ]
|
||||
and set segment $segment ":" $namespace
|
||||
|
||||
__bobthefish_start_segment $color_k8s
|
||||
echo -ns $segment " "
|
||||
end
|
||||
|
||||
|
||||
@ -801,6 +821,20 @@ function __bobthefish_prompt_desk -S -d 'Display current desk environment'
|
||||
set_color normal
|
||||
end
|
||||
|
||||
function __bobthefish_prompt_nvm -S -d 'Display current node version through NVM'
|
||||
[ "$theme_display_nvm" = 'yes' -a -n "$NVM_DIR" ]
|
||||
or return
|
||||
|
||||
set -l node_version (nvm current 2> /dev/null)
|
||||
|
||||
[ -z $node_version -o "$node_version" = 'none' -o "$node_version" = 'system' ]
|
||||
and return
|
||||
|
||||
__bobthefish_start_segment $color_nvm
|
||||
echo -ns $node_glyph $node_version ' '
|
||||
set_color normal
|
||||
end
|
||||
|
||||
|
||||
# ==============================
|
||||
# VCS segments
|
||||
@ -1004,6 +1038,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
||||
__bobthefish_prompt_rubies
|
||||
__bobthefish_prompt_virtualfish
|
||||
__bobthefish_prompt_virtualgo
|
||||
__bobthefish_prompt_nvm
|
||||
|
||||
set -l real_pwd (__bobthefish_pwd)
|
||||
|
||||
|
||||
@ -1 +1,7 @@
|
||||
9151d470-11e7-49d0-8506-97ce582ac744
|
||||
<<<<<<< Updated upstream
|
||||
9151d470-11e7-49d0-8506-97ce582ac744
|
||||
||||||| merged common ancestors
|
||||
c14771fc-3a4a-4e14-8d32-07582bd840bc
|
||||
=======
|
||||
cd0db777-43b9-4786-9f9d-63955587166c
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
1
fonts/.local/share/fonts/.uuid
Normal file
1
fonts/.local/share/fonts/.uuid
Normal file
@ -0,0 +1 @@
|
||||
49d94597-4c24-47d7-a0f7-027fdb232980
|
||||
BIN
fonts/.local/share/fonts/all-the-icons.ttf
Normal file
BIN
fonts/.local/share/fonts/all-the-icons.ttf
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/file-icons.ttf
Normal file
BIN
fonts/.local/share/fonts/file-icons.ttf
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/fontawesome.ttf
Normal file
BIN
fonts/.local/share/fonts/fontawesome.ttf
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/material-design-icons.ttf
Normal file
BIN
fonts/.local/share/fonts/material-design-icons.ttf
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/octicons.ttf
Normal file
BIN
fonts/.local/share/fonts/octicons.ttf
Normal file
Binary file not shown.
BIN
fonts/.local/share/fonts/weathericons.ttf
Normal file
BIN
fonts/.local/share/fonts/weathericons.ttf
Normal file
Binary file not shown.
17
systemd/.config/systemd/user/syncthing.service
Normal file
17
systemd/.config/systemd/user/syncthing.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=Syncthing - Open Source Continuous File Synchronization
|
||||
Documentation=man:syncthing(1)
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
|
||||
Restart=on-failure
|
||||
SuccessExitStatus=3 4
|
||||
RestartForceExitStatus=3 4
|
||||
|
||||
# Hardening
|
||||
SystemCallArchitectures=native
|
||||
MemoryDenyWriteExecute=true
|
||||
NoNewPrivileges=true
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user