mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-27 22:45:27 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f2fd3cfd6 | ||
| 9621c67866 | |||
| 5e59893281 | |||
| ea292de853 | |||
| d2cedd0fee | |||
| 995cc569e7 | |||
| cceeba3f8e | |||
| dd3640586e | |||
|
|
11969bf791 |
@@ -29,6 +29,3 @@ switch_case_indent = true # --case-indent
|
||||
space_redirects = false
|
||||
keep_padding = false
|
||||
function_next_line = true # --func-next-line
|
||||
|
||||
[local/bin/antigen.zsh]
|
||||
ignore = true
|
||||
|
||||
16
.gitmodules
vendored
16
.gitmodules
vendored
@@ -8,24 +8,14 @@
|
||||
url = https://github.com/wren/dotbot-brew.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-if"]
|
||||
path = dotbot-if
|
||||
url = https://github.com/wonderbeyond/dotbot-if.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-ifplatform"]
|
||||
path = dotbot-ifplatform
|
||||
url = https://github.com/ssbanerje/dotbot-ifplatform.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-gh-extension"]
|
||||
path = dotbot-gh-extension
|
||||
url = https://github.com/fundor333/dotbot-gh-extension.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "dotbot-golang"]
|
||||
path = dotbot-golang
|
||||
url = https://github.com/delicb/dotbot-golang.git
|
||||
[submodule "dotbot-include"]
|
||||
path = dotbot-include
|
||||
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
||||
ignore = dirty
|
||||
|
||||
[submodule "config/nvim"]
|
||||
|
||||
12
Brewfile
12
Brewfile
@@ -23,6 +23,8 @@ brew "ansible"
|
||||
brew "ansible-lint"
|
||||
# Zstandard is a real-time compression algorithm
|
||||
brew "zstd"
|
||||
# Open Source Kubernetes Marketplace
|
||||
brew "arkade"
|
||||
# Spell checker with better logic than ispell
|
||||
brew "aspell"
|
||||
# Automatic configure script builder
|
||||
@@ -31,6 +33,8 @@ brew "autoconf"
|
||||
brew "awscli"
|
||||
# Terminal bandwidth utilization tool
|
||||
brew "bandwhich"
|
||||
# Clone of cat(1) with syntax highlighting and Git integration
|
||||
brew "bat"
|
||||
# Yet another cross-platform graphical process/system monitor
|
||||
brew "bottom"
|
||||
# Switch Apache / Valet / CLI configs between PHP versions
|
||||
@@ -99,6 +103,8 @@ brew "netpbm"
|
||||
brew "icu4c"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# Framework for layout and rendering of i18n text
|
||||
brew "pango"
|
||||
# Library to render SVG files using Cairo
|
||||
brew "librsvg"
|
||||
# Graph visualization software from AT&T and Bell Labs
|
||||
@@ -193,6 +199,8 @@ brew "tldr"
|
||||
brew "tmux"
|
||||
# Display directories as trees (with optional color/HTML output)
|
||||
brew "tree"
|
||||
# Vulnerability scanner for container images, file systems, and Git repos
|
||||
brew "trivy"
|
||||
# Modern watch command
|
||||
brew "viddy"
|
||||
# Tool for creating isolated virtual python environments
|
||||
@@ -207,8 +215,6 @@ brew "wget"
|
||||
brew "wtfutil"
|
||||
# JavaScript package manager
|
||||
brew "yarn"
|
||||
# Tracks most-used directories to make cd smarter
|
||||
brew "z"
|
||||
# A vulnerability scanner for container images and filesystems
|
||||
brew "anchore/grype/grype"
|
||||
# High-performance load testing tool, written in Golang.
|
||||
@@ -267,6 +273,8 @@ cask "insomnia"
|
||||
cask "jetbrains-toolbox"
|
||||
# Kubernetes IDE
|
||||
cask "lens"
|
||||
# Neovim Client
|
||||
cask "neovide"
|
||||
# Reverse proxy, secure introspectable tunnels to localhost
|
||||
cask "ngrok"
|
||||
# Collaboration platform for API development
|
||||
|
||||
@@ -2,6 +2,4 @@
|
||||
|
||||
git submodule add --name dotbot-brew -f https://github.com/wren/dotbot-brew.git dotbot-brew
|
||||
git submodule add --name dotbot-gh-extension -f https://github.com/fundor333/dotbot-gh-extension.git dotbot-gh-extension
|
||||
git submodule add --name dotbot-golang -f https://github.com/delicb/dotbot-golang.git dotbot-golang
|
||||
git submodule add --name dotbot-if -f https://github.com/wonderbeyond/dotbot-if.git dotbot-if
|
||||
git submodule add --name dotbot-ifplatform -f https://github.com/ssbanerje/dotbot-ifplatform.git dotbot-ifplatform
|
||||
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
|
||||
|
||||
6
base/angular-config.json
Normal file
6
base/angular-config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
||||
94
base/bashrc
94
base/bashrc
@@ -1,76 +1,9 @@
|
||||
# this is my bashrc config. there are many like it, but this one is mine.
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||
|
||||
# Homebrew configuration
|
||||
export HOMEBREW="/opt/homebrew"
|
||||
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$HOMEBREW_BIN:$HOMEBREW_SBIN:/usr/local/sbin:$PATH"
|
||||
|
||||
# brew, https://brew.sh
|
||||
if command -v brew &> /dev/null; then
|
||||
BREW_BIN=$(brew --prefix)/bin
|
||||
BREW_SBIN=$(brew --prefix)/sbin
|
||||
|
||||
BREW_PYTHON=$(brew --prefix python@3.8)/bin
|
||||
GNUBIN_DIR=$(brew --prefix coreutils)/libexec/gnubin
|
||||
BREW_RUBY=$(brew --prefix ruby)/bin
|
||||
BREW_GEMS=$(gem environment gemdir)/bin
|
||||
|
||||
export PATH="$BREW_PYTHON:$GNUBIN_DIR:$BREW_GEMS:$BREW_RUBY:$BREW_BIN:$BREW_SBIN:$PATH"
|
||||
fi
|
||||
|
||||
# nvm, the node version manager
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
|
||||
# If we have go packages, include them to the PATH
|
||||
if command -v go &> /dev/null; then
|
||||
export GOPATH=$(go env GOPATH);
|
||||
if [ -d "$GOPATH/bin" ]; then
|
||||
export PATH="$GOPATH/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
|
||||
if command -v nvim &> /dev/null; then
|
||||
export EDITOR="nvim"
|
||||
fi
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
if command -v composer &> /dev/null; then
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# gem, rubygems
|
||||
if command -v gem &>/dev/null; then
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||
fi
|
||||
|
||||
|
||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
@@ -86,28 +19,3 @@ x-load-configs
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
|
||||
# op (1Password cli) is present
|
||||
if hash op 2>/dev/null; then
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
mkdir -p "$OP_CACHE";
|
||||
eval "$(op completion zsh)"; compdef _op op
|
||||
fi
|
||||
|
||||
# Ansible configuration
|
||||
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
||||
if hash ansible 2>/dev/null; then
|
||||
export ANSIBLE_HOME="$XDG_STATE_HOME/ansible"
|
||||
mkdir -p "$ANSIBLE_HOME"
|
||||
fi
|
||||
|
||||
# gcloud is present
|
||||
#if hash gcloud 2>/dev/null; then
|
||||
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
||||
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||
#fi
|
||||
|
||||
# Load iterm2 shell integration
|
||||
# https://iterm2.com/documentation-shell-integration.html
|
||||
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] && source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
||||
|
||||
@@ -5,4 +5,3 @@ email = ismo.vuorinen@vincit.fi
|
||||
[home]
|
||||
name = Ismo Vuorinen
|
||||
email = ismo@vuorinen.net
|
||||
|
||||
|
||||
160
base/zshrc
160
base/zshrc
@@ -7,168 +7,34 @@ colors
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||
|
||||
# Homebrew configuration
|
||||
export HOMEBREW="/opt/homebrew"
|
||||
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$HOMEBREW_BIN:$HOMEBREW_SBIN:/usr/local/sbin:$PATH"
|
||||
|
||||
# brew, https://brew.sh
|
||||
if [ command -v brew &> /dev/null ]; then
|
||||
BREW_BIN=$(brew --prefix)/bin
|
||||
BREW_SBIN=$(brew --prefix)/sbin
|
||||
|
||||
BREW_PYTHON=$(brew --prefix python)/bin
|
||||
GNUBIN_DIR=$(brew --prefix coreutils)/libexec/gnubin
|
||||
BREW_RUBY=$(brew --prefix ruby)/bin
|
||||
BREW_GEMS=$(gem environment gemdir)/bin
|
||||
|
||||
export PATH="$BREW_PYTHON:$GNUBIN_DIR:$BREW_GEMS:$BREW_RUBY:$BREW_BIN:$BREW_SBIN:$PATH"
|
||||
fi
|
||||
|
||||
# nvm, the node version manager
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_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
|
||||
|
||||
# If we have go packages, include them to the PATH
|
||||
if command -v go &> /dev/null; then
|
||||
export GOPATH="$XDG_DATA_HOME/go";
|
||||
export GOBIN="$XDG_BIN_HOME"
|
||||
mkdir -p "$GOPATH"
|
||||
fi
|
||||
|
||||
if command -v nvim &> /dev/null; then
|
||||
export EDITOR="nvim"
|
||||
fi
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
if command -v composer &> /dev/null; then
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# gem, rubygems
|
||||
if command -v gem &>/dev/null; then
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||
fi
|
||||
|
||||
|
||||
# pyenv, python environments
|
||||
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
||||
mkdir -p "$PYENV_ROOT"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
if command -v pyenv &>/dev/null; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
done
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -f "$file" ] && source "$file"
|
||||
[ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
|
||||
# Import ssh keys in keychain
|
||||
ssh-add -A 2>/dev/null;
|
||||
|
||||
# Antigen configuration
|
||||
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
||||
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
||||
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||
|
||||
# Try to load antigen, if present
|
||||
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
||||
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||
|
||||
# antigen is present
|
||||
if command -v antigen &> /dev/null; then
|
||||
antigen use oh-my-zsh
|
||||
antigen use oh-my-zsh
|
||||
|
||||
antigen bundle ssh-agent
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||
# config/functions
|
||||
x-default-antigen-bundles
|
||||
|
||||
hash php 2>/dev/null && antigen bundle php
|
||||
hash nvm 2>/dev/null && antigen bundle nvm
|
||||
hash docker 2>/dev/null && antigen bundle docker
|
||||
hash python 2>/dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||
hash jq 2>/dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||
hash docker-compose 2>/dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||
|
||||
# Platform dependant bundles
|
||||
if [[ $(uname) == 'Linux' ]]; then
|
||||
antigen bundle command-not-found
|
||||
elif [[ $(uname) == 'Darwin' ]]; then
|
||||
# If we have brew installed
|
||||
if command -v brew &> /dev/null; then
|
||||
# Only enable brew plugin if brew exists
|
||||
antigen bundle brew
|
||||
# load Z
|
||||
[[ -f "$(brew --prefix z)/etc/profile.d/z.sh" ]] && source "$(brew --prefix z)/etc/profile.d/z.sh"
|
||||
fi
|
||||
fi
|
||||
|
||||
antigen apply
|
||||
antigen apply
|
||||
fi
|
||||
|
||||
# op (1Password cli) is present
|
||||
if hash op 2>/dev/null; then
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
mkdir -p $OP_CACHE;
|
||||
eval "$(op completion zsh)"; compdef _op op
|
||||
fi
|
||||
|
||||
# Ansible configuration
|
||||
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
||||
if hash ansible 2>/dev/null; then
|
||||
export ANSIBLE_HOME="$XDG_STATE_HOME/ansible"
|
||||
mkdir -p "$ANSIBLE_HOME"
|
||||
fi
|
||||
|
||||
# gcloud is present
|
||||
#if hash gcloud 2>/dev/null; then
|
||||
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
||||
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||
#fi
|
||||
|
||||
# Load iterm2 shell integration
|
||||
# https://iterm2.com/documentation-shell-integration.html
|
||||
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] && source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
||||
|
||||
eval "$(starship init zsh)"
|
||||
|
||||
|
||||
28
config/alias
Normal file → Executable file
28
config/alias
Normal file → Executable file
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# macOS specific
|
||||
|
||||
# Get installed php versions from brew and setup aliases
|
||||
function x-set-php-aliases
|
||||
@@ -26,14 +25,14 @@ function x-set-php-aliases
|
||||
# shellcheck disable=SC2139
|
||||
alias "${php_alias}"r="$php_exec"
|
||||
# PHP with error_reporting flag.
|
||||
# shellcheck disable=SC2139
|
||||
# shellcheck disable=SC2139,SC2140
|
||||
alias "$php_alias"="$php_exec $php_error_reporting"
|
||||
# Local PHP Server.
|
||||
# shellcheck disable=SC2139
|
||||
alias "${php_alias}"s="$php_exec -S localhost:9000"
|
||||
# shellcheck disable=SC2139,SC2140
|
||||
alias "${php_alias}s"="$php_exec -S localhost:9000"
|
||||
# Use composer with specific PHP and error_reporting flag on.
|
||||
# shellcheck disable=SC2139
|
||||
alias "${php_alias}"c="$php_exec $php_error_reporting $(which composer)"
|
||||
# shellcheck disable=SC2139,SC2140
|
||||
alias "${php_alias}c"="$php_exec $php_error_reporting $(which composer)"
|
||||
done
|
||||
fi
|
||||
}
|
||||
@@ -42,6 +41,7 @@ if [[ $(uname) == 'Darwin' ]]; then
|
||||
|
||||
x-set-php-aliases
|
||||
|
||||
# Laravel Sail shortcut
|
||||
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
|
||||
|
||||
# Flush Directory Service cache
|
||||
@@ -60,15 +60,12 @@ alias zapds='find . -name ".DS_Store" -print -delete'
|
||||
alias t='tail -f' # tail with follow flag on
|
||||
alias dn='du -chd1' # directory usage, return only the total
|
||||
|
||||
alias code_scanner="docker run \
|
||||
--env SOURCE_CODE='${PWD}' \
|
||||
--volume '${PWD}':/code \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
registry.gitlab.com/gitlab-org/ci-cd/codequality:${CODEQUALITY_VERSION:-latest} \
|
||||
/code"
|
||||
|
||||
alias composerUp='composer global update'
|
||||
alias npmUp='npm -g up'
|
||||
alias code_scanner='docker run
|
||||
--env SOURCE_CODE="$PWD"
|
||||
--volume "${PWD}":/code
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock
|
||||
registry.gitlab.com/gitlab-org/ci-cd/codequality:"${CODEQUALITY_VERSION:-latest}"
|
||||
/code'
|
||||
|
||||
alias zedit='$EDITOR ~/.dotfiles'
|
||||
|
||||
@@ -76,4 +73,3 @@ if [[ -f "$HOME/.aliases.local" ]]; then
|
||||
# shellcheck disable=SC1091
|
||||
source "$HOME/.aliases.local"
|
||||
fi
|
||||
|
||||
|
||||
121
config/exports
Normal file → Executable file
121
config/exports
Normal file → Executable file
@@ -1,17 +1,22 @@
|
||||
# shellcheck shell=bash
|
||||
|
||||
export HIST_STAMPS="yyyy-mm-dd"
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||
|
||||
# History env variables
|
||||
export HIST_STAMPS="yyyy-mm-dd"
|
||||
# Larger bash history (allow 32³ entries; default is 500)
|
||||
export HISTSIZE=32768
|
||||
export HISTFILESIZE=$HISTSIZE
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
export HISTCONTROL=ignoreboth
|
||||
|
||||
# Make some commands not show up in history
|
||||
export HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help"
|
||||
|
||||
# And include the parameter for ZSH
|
||||
export HISTORY_IGNORE="(ls|cd|cd -|pwd|exit|date|* --help)"
|
||||
|
||||
@@ -26,5 +31,113 @@ export GREP_OPTIONS="--color=auto"
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
hash shopt 2>/dev/null && shopt -s checkwinsize
|
||||
hash shopt 2> /dev/null && shopt -s checkwinsize
|
||||
|
||||
export LC_ALL=fi_FI.utf8
|
||||
|
||||
# Antigen configuration
|
||||
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
||||
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
||||
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||
|
||||
# Homebrew configuration
|
||||
export HOMEBREW="/opt/homebrew"
|
||||
export HOMEBREW_BIN="$HOMEBREW/bin"
|
||||
export HOMEBREW_SBIN="$HOMEBREW/sbin"
|
||||
export HOMEBREW_PKG="$HOMEBREW/opt"
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$HOMEBREW_BIN:$HOMEBREW_SBIN:/usr/local/sbin:$PATH"
|
||||
|
||||
# brew, https://brew.sh
|
||||
if command -v brew &> /dev/null; then
|
||||
BREW_PYTHON=$(brew --prefix python)/bin
|
||||
GNUBIN_DIR=$(brew --prefix coreutils)/libexec/gnubin
|
||||
BREW_RUBY=$(brew --prefix ruby)/bin
|
||||
BREW_GEMS=$(gem environment gemdir)/bin
|
||||
|
||||
export PATH="$BREW_PYTHON:$GNUBIN_DIR:$BREW_GEMS:$BREW_RUBY:$PATH"
|
||||
fi
|
||||
|
||||
# nvm, the node version manager
|
||||
export NVM_LAZY_LOAD=true
|
||||
export NVM_COMPLETION=true
|
||||
export NVM_AUTO_USE=true
|
||||
export NVM_DIR="${XDG_CONFIG_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
|
||||
|
||||
# If we have go packages, include them to the PATH
|
||||
if command -v go &> /dev/null; then
|
||||
export GOPATH="$XDG_DATA_HOME/go"
|
||||
export GOBIN="$XDG_BIN_HOME"
|
||||
mkdir -p "$GOPATH"
|
||||
fi
|
||||
|
||||
if command -v nvim &> /dev/null; then
|
||||
export EDITOR="nvim"
|
||||
fi
|
||||
|
||||
# docker, https://docs.docker.com/engine/reference/commandline/cli/
|
||||
if command -v docker &> /dev/null; then
|
||||
export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker"
|
||||
mkdir -p "$DOCKER_CONFIG"
|
||||
fi
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
[[ -f "$XDG_BIN_HOME/z/z.sh" ]] && source "$XDG_BIN_HOME/z/z.sh"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
if command -v composer &> /dev/null; then
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# gem, rubygems
|
||||
if command -v gem &> /dev/null; then
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export GEM_PATH="$XDG_STATE_HOME/gem"
|
||||
export PATH="$GEM_HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# pyenv, python environments
|
||||
export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
|
||||
mkdir -p "$PYENV_ROOT"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
|
||||
if command -v pyenv &> /dev/null; then
|
||||
eval "$(pyenv init -)"
|
||||
fi
|
||||
|
||||
# wakatime, https://github.com/wakatime/wakatime-cli
|
||||
export WAKATIME_HOME="$XDG_STATE_HOME/wakatime"
|
||||
|
||||
# op (1Password cli) is present
|
||||
if hash op 2> /dev/null; then
|
||||
export OP_CACHE="$XDG_STATE_HOME/1password"
|
||||
mkdir -p "$OP_CACHE"
|
||||
eval "$(op completion zsh)"
|
||||
compdef _op op
|
||||
fi
|
||||
|
||||
# Ansible configuration
|
||||
# https://docs.ansible.com/ansible/latest/reference_appendices/config.html
|
||||
if hash ansible 2> /dev/null; then
|
||||
export ANSIBLE_HOME="$XDG_STATE_HOME/ansible"
|
||||
mkdir -p "$ANSIBLE_HOME"
|
||||
fi
|
||||
|
||||
# gcloud is present
|
||||
#if hash gcloud 2>/dev/null; then
|
||||
# GCLOUD_LOC=$(gcloud info --format="value(installation.sdk_root)" --quiet)
|
||||
# [[ -f "$GCLOUD_LOC/path.zsh.inc" ]] && builtin source "$GCLOUD_LOC/path.zsh.inc"
|
||||
# [[ -f "$GCLOUD_LOC/completion.zsh.inc" ]] && builtin source "$GCLOUD_LOC/completion.zsh.inc"
|
||||
#fi
|
||||
|
||||
# Load iterm2 shell integration
|
||||
# https://iterm2.com/documentation-shell-integration.html
|
||||
[[ -f "$XDG_BIN_HOME/iterm2_shell_integration.zsh" ]] \
|
||||
&& source "$XDG_BIN_HOME/iterm2_shell_integration.zsh"
|
||||
|
||||
25
config/functions
Normal file → Executable file
25
config/functions
Normal file → Executable file
@@ -66,3 +66,28 @@ function silent
|
||||
"$@" >&/dev/null
|
||||
}
|
||||
|
||||
# Defines default antigen bundles
|
||||
function x-default-antigen-bundles
|
||||
{
|
||||
# these should be always available
|
||||
antigen bundle colored-man-pages
|
||||
antigen bundle command-not-found
|
||||
antigen bundle ssh-agent
|
||||
antigen bundle MichaelAquilina/zsh-you-should-use
|
||||
antigen bundle Sparragus/zsh-auto-nvm-use
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
|
||||
# these should be available if there's need
|
||||
hash git 2> /dev/null && antigen bundle git
|
||||
hash brew 2> /dev/null && antigen bundle brew
|
||||
hash docker 2> /dev/null && antigen bundle docker
|
||||
hash docker-compose 2> /dev/null && antigen bundle sroze/docker-compose-zsh-plugin
|
||||
hash jq 2> /dev/null && antigen bundle reegnz/jq-zsh-plugin
|
||||
hash nvm 2> /dev/null && antigen bundle nvm
|
||||
hash php 2> /dev/null && antigen bundle php
|
||||
hash python 2> /dev/null && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
|
||||
hash rvm 2> /dev/null && antigen bundle unixorn/rvm-plugin
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
# Inserts a blank line between shell prompts
|
||||
add_newline = true
|
||||
|
||||
# Timeout for commands executed by starship (in milliseconds).
|
||||
command_timeout = 1000
|
||||
|
||||
# Replace the '❯' symbol in the prompt with '➜'
|
||||
[character] # The name of the module we are configuring is 'character'
|
||||
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
|
||||
@@ -32,4 +35,3 @@ version_format = '${major}.${minor}'
|
||||
[nodejs]
|
||||
format = '[$symbol($version )]($style)'
|
||||
version_format = '${major}.${minor}'
|
||||
|
||||
|
||||
Submodule dotbot-golang deleted from 4fa60bd487
Submodule dotbot-if deleted from 2b4dc56943
Submodule dotbot-ifplatform deleted from e35b5c0d71
1
dotbot-include
Submodule
1
dotbot-include
Submodule
Submodule dotbot-include added at 6943c52125
0
hosts/air/base/.gitkeep
Normal file
0
hosts/air/base/.gitkeep
Normal file
0
hosts/air/config/.gitkeep
Normal file
0
hosts/air/config/.gitkeep
Normal file
15
hosts/air/install.conf.yaml
Normal file
15
hosts/air/install.conf.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
- include: 'hosts/defaults.yaml'
|
||||
- shell:
|
||||
- echo "Configuring air"
|
||||
- brewfile:
|
||||
- Brewfile
|
||||
- link:
|
||||
~/:
|
||||
force: true
|
||||
glob: true
|
||||
path: hosts/air/base/**
|
||||
prefix: "."
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/air/config/**
|
||||
9
hosts/defaults.yaml
Normal file
9
hosts/defaults.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
- defaults:
|
||||
create:
|
||||
mode: 0755
|
||||
link:
|
||||
create: true
|
||||
relink: true
|
||||
exclude: ["*.md", "*renovate*"]
|
||||
shell:
|
||||
stdout: true
|
||||
0
hosts/lakka/base/.gitkeep
Normal file
0
hosts/lakka/base/.gitkeep
Normal file
50
hosts/lakka/base/zshrc
Normal file
50
hosts/lakka/base/zshrc
Normal file
@@ -0,0 +1,50 @@
|
||||
# Lakka zsh configuration.
|
||||
#
|
||||
# shellcheck shell=bash
|
||||
export PATH="$HOME/bin:/usr/local/bin:/usr/bin:/usr/sbin:$PATH"
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Run x-load-configs in your terminal to reload the files.
|
||||
function x-load-configs()
|
||||
{
|
||||
# Load the shell dotfiles, and then some:
|
||||
for file in $DOTFILES/config/{exports,alias,functions}; do
|
||||
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
||||
[ -r "$file-secret" ] && [ -f "$file-secret" ] && source "$file-secret"
|
||||
[ -r "$file-$HOSTNAME" ] && [ -f "$file-$HOSTNAME" ] && source "$file-$HOSTNAME"
|
||||
[ -r "$file-$HOSTNAME-secret" ] && [ -f "$file-$HOSTNAME-secret" ] && source "$file-$HOSTNAME-secret"
|
||||
done
|
||||
}
|
||||
x-load-configs
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$PATH"
|
||||
export LC_ALL=fi_FI.utf8
|
||||
|
||||
export RVM_PATH="$HOME/.rvm"
|
||||
export PATH="$RVM_PATH/bin:$PATH"
|
||||
[[ -s "$RVM_PATH/scripts/rvm" ]] && source "$RVM_PATH/scripts/rvm" # Load RVM into a shell session *as a function*
|
||||
|
||||
# Try to load antigen, if present
|
||||
ANTIGEN_ZSH_PATH="$XDG_BIN_HOME/antigen.zsh"
|
||||
[[ -f "$ANTIGEN_ZSH_PATH" ]] && source "$ANTIGEN_ZSH_PATH"
|
||||
|
||||
# If antigen was loaded
|
||||
if command -v antigen &> /dev/null; then
|
||||
antigen use oh-my-zsh
|
||||
|
||||
# config/functions
|
||||
x-default-antigen-bundles
|
||||
|
||||
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
||||
|
||||
antigen apply
|
||||
fi
|
||||
|
||||
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
|
||||
alias nano='nano -wS -$'
|
||||
alias gpg=gpg2
|
||||
|
||||
ACME_PATH="$HOME/.acme.sh"
|
||||
[[ -s "$ACME_PATH/acme.sh.env" ]] && . "$ACME_PATH/acme.sh.env"
|
||||
0
hosts/lakka/config/.gitkeep
Normal file
0
hosts/lakka/config/.gitkeep
Normal file
17
hosts/lakka/install.conf.yaml
Normal file
17
hosts/lakka/install.conf.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
- include: 'hosts/defaults.yaml'
|
||||
- shell:
|
||||
- echo "Configuring lakka"
|
||||
- link:
|
||||
~/:
|
||||
force: true
|
||||
glob: true
|
||||
path: hosts/lakka/base/**
|
||||
prefix: "."
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/lakka/config/**
|
||||
~/.irssi/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/lakka/irssi/**
|
||||
@@ -1,72 +0,0 @@
|
||||
# Lakka zsh configuration.
|
||||
#
|
||||
# shellcheck shell=bash
|
||||
export PATH="/usr/local/bin:/usr/bin:/usr/sbin:$PATH"
|
||||
|
||||
# Defaults
|
||||
export DOTFILES="$HOME/.dotfiles"
|
||||
|
||||
# Explicitly set XDG folders
|
||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_BIN_HOME="$HOME/.local/bin" # this one is custom
|
||||
|
||||
# z, https://github.com/rupa/z
|
||||
export _Z_DATA="$XDG_STATE_HOME/z"
|
||||
|
||||
# composer, https://getcomposer.org/
|
||||
if command -v composer &> /dev/null; then
|
||||
export COMPOSER_HOME="$XDG_STATE_HOME/composer"
|
||||
export COMPOSER_BIN="$COMPOSER_HOME/vendor/bin"
|
||||
export PATH="$COMPOSER_BIN:$PATH"
|
||||
fi
|
||||
|
||||
# gem, rubygems
|
||||
if command -v gem &>/dev/null; then
|
||||
export GEM_HOME="$XDG_STATE_HOME/gem"
|
||||
export PATH="$GEM_HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
export PATH="$XDG_BIN_HOME:$HOME/bin:$HOME/.rvm/bin:$PATH"
|
||||
export LC_ALL=fi_FI.utf8
|
||||
|
||||
# Antigen configuration
|
||||
# https://github.com/zsh-users/antigen/wiki/Configuration
|
||||
export ADOTDIR="$XDG_DATA_HOME/antigen"
|
||||
export ANTIGEN_SYSTEM_RECEIPT_F=".local/share/antigen/antigen_system_lastupdate"
|
||||
export ANTIGEN_PLUGIN_RECEIPT_F=".local/share/antigen/antigen_plugin_lastupdate"
|
||||
|
||||
# Try to load antigen, if present
|
||||
[[ -f "$XDG_BIN_HOME/antigen.zsh" ]] && source "$XDG_BIN_HOME/antigen.zsh"
|
||||
|
||||
# If antigen was loaded
|
||||
if command -v antigen &> /dev/null; then
|
||||
antigen use oh-my-zsh
|
||||
|
||||
hash git 2>/dev/null && antigen bundle git
|
||||
hash php 2>/dev/null && antigen bundle php
|
||||
|
||||
antigen bundle autojump
|
||||
antigen bundle command-not-found
|
||||
antigen bundle jreese/zsh-titles
|
||||
antigen bundle zsh-users/zsh-syntax-highlighting
|
||||
antigen bundle zsh-users/zsh-completions
|
||||
antigen bundle unixorn/rvm-plugin
|
||||
antigen bundle unixorn/autoupdate-antigen.zshplugin
|
||||
|
||||
antigen theme oskarkrawczyk/honukai-iterm-zsh honukai
|
||||
|
||||
antigen apply
|
||||
fi
|
||||
|
||||
alias t='tail -f'
|
||||
alias logrotate='/usr/sbin/logrotate -s $HOME/logs/state'
|
||||
alias dn='du -chd1'
|
||||
alias nano='nano -wS -$'
|
||||
alias gpg=gpg2
|
||||
|
||||
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
|
||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" ]] # Load RVM into a shell session *as a function*
|
||||
. "$HOME/.acme.sh/acme.sh.env"
|
||||
0
hosts/tunkki/base/.gitkeep
Normal file
0
hosts/tunkki/base/.gitkeep
Normal file
@@ -1,118 +0,0 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" = yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# some more ls aliases
|
||||
alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
0
hosts/tunkki/config/.gitkeep
Normal file
0
hosts/tunkki/config/.gitkeep
Normal file
13
hosts/tunkki/install.conf.yaml
Normal file
13
hosts/tunkki/install.conf.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
- include: 'hosts/defaults.yaml'
|
||||
- shell:
|
||||
- echo "Configuring tunkki"
|
||||
- link:
|
||||
~/:
|
||||
force: true
|
||||
glob: true
|
||||
path: hosts/tunkki/base/**
|
||||
prefix: "."
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/tunkki/config/**
|
||||
0
hosts/v/base/.gitkeep
Normal file
0
hosts/v/base/.gitkeep
Normal file
0
hosts/v/config/.gitkeep
Normal file
0
hosts/v/config/.gitkeep
Normal file
15
hosts/v/install.conf.yaml
Normal file
15
hosts/v/install.conf.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
- include: 'hosts/defaults.yaml'
|
||||
- shell:
|
||||
- echo "Configuring v"
|
||||
- brewfile:
|
||||
- Brewfile
|
||||
- link:
|
||||
~/:
|
||||
force: true
|
||||
glob: true
|
||||
path: hosts/v/base/**
|
||||
prefix: "."
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/v/config/**
|
||||
22
install
22
install
@@ -7,17 +7,31 @@ DOTBOT_DIR="dotbot"
|
||||
|
||||
DOTBOT_BIN="bin/dotbot"
|
||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
|
||||
DOTBOT_HOST="$(hostname -s)" || ''
|
||||
|
||||
cd "$BASEDIR"
|
||||
git submodule sync --quiet --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \
|
||||
"${DOTBOT_BIN_PATH}" \
|
||||
-d "${BASEDIR}" \
|
||||
--plugin-dir=dotbot-brew \
|
||||
--plugin-dir=dotbot-gh-extension \
|
||||
--plugin-dir=dotbot-golang \
|
||||
--plugin-dir=dotbot-if \
|
||||
--plugin-dir=dotbot-ifplatform \
|
||||
--plugin-dir=dotbot-include \
|
||||
-c "${CONFIG}" \
|
||||
"${@}"
|
||||
|
||||
if [ "${DOTBOT_HOST}" != "" ]; then
|
||||
DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}"
|
||||
echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}"
|
||||
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] \
|
||||
&& echo "(!) Found $DOTBOT_HOST_CONFIG" \
|
||||
&& "$DOTBOT_BIN_PATH" \
|
||||
-d "$BASEDIR" \
|
||||
--plugin-dir=dotbot-brew \
|
||||
--plugin-dir=dotbot-gh-extension \
|
||||
--plugin-dir=dotbot-include \
|
||||
-c "$DOTBOT_HOST_CONFIG" \
|
||||
"${@}"
|
||||
fi
|
||||
|
||||
@@ -7,19 +7,27 @@ DOTBOT_DIR="dotbot"
|
||||
|
||||
DOTBOT_BIN="bin/dotbot"
|
||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
DOTBOT_HOST="$(hostname -s)" || ''
|
||||
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
|
||||
|
||||
cd "$BASEDIR"
|
||||
git submodule sync --quiet --recursive
|
||||
git submodule update --init --recursive
|
||||
|
||||
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \
|
||||
"${DOTBOT_BIN_PATH}" \
|
||||
-d "${BASEDIR}" \
|
||||
--plugin-dir=dotbot-include \
|
||||
-c "${CONFIG}" \
|
||||
"${@}"
|
||||
|
||||
# --plugin-dir=dotbot-plugins/dotbot-brew \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-gh-extension \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-golang \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-if \
|
||||
# --plugin-dir=dotbot-plugins/dotbot-ifplatform \
|
||||
# -p dotbot-plugins/dotbot-if/if.py \
|
||||
if [ "${DOTBOT_HOST}" != "" ]; then
|
||||
DOTBOT_HOST_CONFIG="${BASEDIR}/hosts/${DOTBOT_HOST}/${CONFIG}"
|
||||
echo "-> Trying if host config can be found: ${DOTBOT_HOST_CONFIG}"
|
||||
[ -r "$DOTBOT_HOST_CONFIG" ] && [ -f "$DOTBOT_HOST_CONFIG" ] \
|
||||
&& echo "(!) Found $DOTBOT_HOST_CONFIG" \
|
||||
&& "$DOTBOT_BIN_PATH" \
|
||||
-d "$BASEDIR" \
|
||||
--plugin-dir=dotbot-include \
|
||||
-c "$DOTBOT_HOST_CONFIG" \
|
||||
"${@}"
|
||||
fi
|
||||
|
||||
@@ -1,13 +1,4 @@
|
||||
- defaults:
|
||||
brewfile:
|
||||
stderr: true
|
||||
stdout: true
|
||||
create:
|
||||
mode: 0755
|
||||
link:
|
||||
create: true
|
||||
relink: true
|
||||
exclude: ["*.md"]
|
||||
- include: 'hosts/defaults.yaml'
|
||||
- clean:
|
||||
~/:
|
||||
~/.config:
|
||||
@@ -15,6 +6,8 @@
|
||||
~/.local:
|
||||
recursive: true
|
||||
- create:
|
||||
~/.cache:
|
||||
~/.cache/git:
|
||||
~/.config:
|
||||
~/.local:
|
||||
~/.local/share:
|
||||
@@ -23,75 +16,25 @@
|
||||
mode: 0700
|
||||
~/Code:
|
||||
- link:
|
||||
~/:
|
||||
force: true
|
||||
glob: true
|
||||
path: base/**
|
||||
prefix: "."
|
||||
~/.config/:
|
||||
glob: true
|
||||
path: config/*
|
||||
path: config/**
|
||||
~/.local/bin/:
|
||||
glob: true
|
||||
path: local/bin/*
|
||||
path: local/bin/**
|
||||
~/.ssh/:
|
||||
force: true
|
||||
glob: true
|
||||
mode: 0600
|
||||
path: ssh/*
|
||||
~/:
|
||||
force: true
|
||||
glob: true
|
||||
path: base/*
|
||||
prefix: "."
|
||||
path: ssh/**
|
||||
- shell:
|
||||
- [git submodule update --init --recursive --force]
|
||||
- [chsh -s $(which zsh), Making zsh the default shell]
|
||||
- ifmacos:
|
||||
- shell:
|
||||
- [bash scripts/set-macos-defaults.sh]
|
||||
- brewfile:
|
||||
- Brewfile
|
||||
# Go packages what should be included in every system
|
||||
- go:
|
||||
- github.com/skx/sysbox@latest
|
||||
- github.com/dotzero/git-profile
|
||||
- github.com/google/yamlfmt/cmd/yamlfmt@latest
|
||||
# hosts!
|
||||
## hosts: air
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = air ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/air/config/**
|
||||
## hosts: v
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = v ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/v/config/**
|
||||
## hosts: tunkki
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = tunkki ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.config/:
|
||||
glob: true
|
||||
force: true
|
||||
path: hosts/tunkki/config/**
|
||||
## hosts: lakka
|
||||
- if:
|
||||
- cond: "[[ $(hostname) = lakka ]]"
|
||||
met:
|
||||
- link:
|
||||
~/.irssi/*:
|
||||
force: true
|
||||
glob: true
|
||||
path: hosts/lakka/irssi/**
|
||||
~/.zshrc:
|
||||
force: true
|
||||
path: hosts/lakka/zshrc
|
||||
- git submodule update --init --recursive --force
|
||||
- bash local/bin/dfm install all
|
||||
# GitHub CLI Extensions
|
||||
- ghe:
|
||||
# GitHub CLI extension for generating a report on repository dependencies.
|
||||
|
||||
@@ -24,39 +24,69 @@ function section_install
|
||||
|
||||
case "$1" in
|
||||
all)
|
||||
$0 install macos
|
||||
$0 install antigen
|
||||
$0 install starship
|
||||
$0 brew install
|
||||
$0 install composer
|
||||
$0 install dotenv-linter
|
||||
$0 install nvm
|
||||
$0 install macos
|
||||
$0 install npm
|
||||
$0 install ntfy
|
||||
$0 install z
|
||||
;;
|
||||
antigen)
|
||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" && msg_done "🎉 New antigen installed!"
|
||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" \
|
||||
&& msg_done "🎉 New antigen installed!"
|
||||
;;
|
||||
composer)
|
||||
bash "$DOTFILES/scripts/install-composer.sh" \
|
||||
&& msg_done "🎉 composer installed!"
|
||||
;;
|
||||
dotenv-linter)
|
||||
curl -sSfL \
|
||||
https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh \
|
||||
| sh -s -- -b "$XDG_BIN_HOME" \
|
||||
&& msg_done "🎉 dotenv-linter installed!"
|
||||
;;
|
||||
starship)
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin && msg_done "🎉 starship installed!"
|
||||
;;
|
||||
nvm)
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && msg_done " ^=^n^i nvm installed!"
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin \
|
||||
&& msg_done "🎉 starship installed!"
|
||||
;;
|
||||
macos)
|
||||
bash "$DOTFILES/scripts/set-macos-defaults.sh" && msg_done "🎉 Brewfile defined apps has been installed!"
|
||||
bash "$DOTFILES/scripts/set-macos-defaults.sh" \
|
||||
&& msg_done "🎉 Brewfile defined apps has been installed!"
|
||||
;;
|
||||
nvm)
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash \
|
||||
&& git checkout "$HOME/.zshrc" \
|
||||
&& nvm install --lts --latest-npm --default \
|
||||
&& msg_done "🎉 nvm installed!"
|
||||
;;
|
||||
npm)
|
||||
bash "$DOTFILES/scripts/install-npm-packages.sh" && msg_done "NPM Packages have been installed!"
|
||||
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
||||
&& msg_done "🎉 NPM Packages have been installed!"
|
||||
;;
|
||||
settler)
|
||||
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Settler has been run!"
|
||||
ntfy)
|
||||
bash "$DOTFILES/scripts/install-ntfy.sh" \
|
||||
&& msg_done "🎉 ntfy installed!"
|
||||
;;
|
||||
z)
|
||||
bash "$DOTFILES/scripts/install-z.sh" \
|
||||
&& msg_done "🎉 Z has been installed!"
|
||||
;;
|
||||
*)
|
||||
menu_section "$USAGE_PREFIX" "all | antigen | starship | nvm | npm | macos | settler"
|
||||
menu_item "all" "Installs antigen, macos, brew and ext_gh"
|
||||
menu_section "$USAGE_PREFIX" "all | antigen | composer | dotenv-linter | starship | macos | nvm | npm"
|
||||
menu_item "all" "Installs macos defaults, antigen, starship, brew, nvm, npm packages and others"
|
||||
menu_item "antigen" "Updates the antigen.zsh file"
|
||||
menu_item "composer" "Install composer"
|
||||
menu_item "dotenv-linter" "Install dotenv-linter"
|
||||
menu_item "starship" "Install starship.rs"
|
||||
menu_item "macos" "Setup nice macOS defaults"
|
||||
menu_item "nvm" "Install Node Version Manager (nvm)"
|
||||
menu_item "npm" "Install NPM Packages"
|
||||
menu_item "macos" "Setup nice macOS defaults"
|
||||
menu_item "settler" "Runs the WIP settler.sh"
|
||||
menu_item "ntfy" "Install ntfy"
|
||||
menu_item "z" "Install z"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -120,7 +150,7 @@ function section_dotfiles
|
||||
msg_ok "Linked nvim and astronvim"
|
||||
hash npm 2> /dev/null && $0 install npm
|
||||
msg_ok "Installed packages"
|
||||
msg_done "...and we are done!"
|
||||
msg_done "nvim reset!"
|
||||
;;
|
||||
yamlfmt)
|
||||
# format yaml files
|
||||
@@ -134,12 +164,14 @@ function section_dotfiles
|
||||
-not -path '*dotbot*' \
|
||||
-not -name '*.pl' \
|
||||
-not -name '*.py' \
|
||||
-not -name '*.php' \
|
||||
-not -name '*.zsh' \
|
||||
-exec shfmt \
|
||||
--language-dialect bash \
|
||||
--func-next-line --list --write \
|
||||
--indent 2 --case-indent --space-redirects \
|
||||
--binary-next-line {} \;
|
||||
msg_done "🎉 dotfiles have been formatted!"
|
||||
msg_done "🎉 dotfiles have been shfmt formatted!"
|
||||
;;
|
||||
*)
|
||||
menu_section "$USAGE_PREFIX" "reset_all | reset_nvim | yamlfmt | shfmt"
|
||||
|
||||
19
scripts/install-composer.sh
Executable file
19
scripts/install-composer.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
if command -v php &> /dev/null; then
|
||||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
|
||||
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
||||
|
||||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
|
||||
echo >&2 'ERROR: Invalid installer checksum'
|
||||
rm composer-setup.php
|
||||
exit 1
|
||||
fi
|
||||
|
||||
php composer-setup.php --quiet
|
||||
RESULT=$?
|
||||
rm composer-setup.php
|
||||
mv composer.phar ~/.local/bin/composer
|
||||
exit $RESULT
|
||||
fi
|
||||
30
scripts/install-go-packages.sh
Executable file
30
scripts/install-go-packages.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install Go packages
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
||||
|
||||
if ! command -v go &> /dev/null; then
|
||||
msg "go hasn't been installed yet."
|
||||
else
|
||||
packages=(
|
||||
# sysadmin/scripting utilities, distributed as a single binary
|
||||
github.com/skx/sysbox@latest
|
||||
github.com/dotzero/git-profile@latest
|
||||
github.com/google/yamlfmt/cmd/yamlfmt@latest
|
||||
)
|
||||
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
|
||||
msg_run "Installing go package:" "$pkg"
|
||||
go install "$pkg"
|
||||
echo ""
|
||||
done
|
||||
|
||||
msg_ok "Done"
|
||||
|
||||
fi
|
||||
33
scripts/install-ntfy.sh
Executable file
33
scripts/install-ntfy.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if ! command -v ntfy &> /dev/null; then
|
||||
case $(dfm check arch) in
|
||||
Linux)
|
||||
NTFY_ARCH="linux_$(arch)"
|
||||
;;
|
||||
Darwin)
|
||||
NTFY_ARCH="macOS_all"
|
||||
;;
|
||||
esac
|
||||
|
||||
NTFY_VERSION=2.2.0
|
||||
NTFY_URL="https://github.com/binwiederhier/ntfy"
|
||||
NTFY_DEST="ntfy_${NTFY_VERSION}_${NTFY_ARCH}"
|
||||
|
||||
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_DEST}.tar.gz" \
|
||||
> "${NTFY_DEST}.tar.gz"
|
||||
tar zxvf "${NTFY_DEST}.tar.gz"
|
||||
cp -a "${NTFY_DEST}/ntfy" ~/.local/bin/ntfy
|
||||
mkdir -p ~/.config/ntfy
|
||||
|
||||
# copy config only if it does not exist
|
||||
if [ ! -f "$HOME/.config/ntfy/client.yml" ]; then
|
||||
cp "${NTFY_DEST}/client/client.yml" ~/.config/ntfy/client.yml
|
||||
fi
|
||||
|
||||
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"
|
||||
else
|
||||
echo "ntfy already installed"
|
||||
fi
|
||||
10
scripts/install-z.sh
Executable file
10
scripts/install-z.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Z_GIT_PATH="https://github.com/rupa/z.git"
|
||||
Z_BIN_PATH="$XDG_BIN_HOME/z"
|
||||
|
||||
if [ ! -d "$Z_BIN_PATH" ]; then
|
||||
git clone "$Z_GIT_PATH" "$Z_BIN_PATH"
|
||||
else
|
||||
echo "z ($Z_BIN_PATH/) already installed"
|
||||
fi
|
||||
@@ -19,6 +19,11 @@ while true; do
|
||||
kill -0 "$$" || exit
|
||||
done 2> /dev/null &
|
||||
|
||||
# Change user shell to zsh if not that already.
|
||||
if hash zsh 2> /dev/null; then
|
||||
[[ "$SHELL" != $(which zsh) ]] && chsh -s "$(which zsh)"
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
# General UI/UX #
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user