mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 07:47:48 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e8875e734 | |||
| 70a9237166 | |||
| 59b08f8d1f | |||
| c9bc6e597a | |||
| 5cd720cc4d | |||
| e618f64cf5 | |||
| fed9769640 |
@@ -8,5 +8,8 @@ indent_style = space
|
|||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{yaml,yml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[local/bin/antigen.zsh]
|
[local/bin/antigen.zsh]
|
||||||
ignore = true
|
ignore = true
|
||||||
|
|||||||
33
.gitmodules
vendored
33
.gitmodules
vendored
@@ -1,12 +1,37 @@
|
|||||||
|
[submodule "dotbot"]
|
||||||
|
path = dotbot
|
||||||
|
url = https://github.com/anishathalye/dotbot.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "dotbot-plugins/dotbot-brew"]
|
||||||
|
path = dotbot-plugins/dotbot-brew
|
||||||
|
url = https://github.com/wren/dotbot-brew.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "dotbot-plugins/dotbot-if"]
|
||||||
|
path = dotbot-plugins/dotbot-if
|
||||||
|
url = https://github.com/wonderbeyond/dotbot-if.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "dotbot-plugins/dotbot-gh-extension"]
|
||||||
|
path = dotbot-plugins/dotbot-gh-extension
|
||||||
|
url = https://github.com/fundor333/dotbot-gh-extension.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "dotbot-plugins/dotbot-golang"]
|
||||||
|
path = dotbot-plugins/dotbot-golang
|
||||||
|
url = https://github.com/delicb/dotbot-golang.git
|
||||||
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "config/nvim"]
|
[submodule "config/nvim"]
|
||||||
path = config/nvim
|
path = config/nvim
|
||||||
url = git@github.com:AstroNvim/AstroNvim.git
|
url = https://github.com/AstroNvim/AstroNvim.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
branch = v3
|
branch = main
|
||||||
update = checkout
|
update = checkout
|
||||||
|
|
||||||
[submodule "config/astronvim/lua/user"]
|
[submodule "config/astronvim/lua/user"]
|
||||||
path = config/astronvim/lua/user
|
path = config/astronvim/lua/user
|
||||||
url = git@github.com:ivuorinen/astronvim_config.git
|
url = https://github.com/ivuorinen/astronvim_config.git
|
||||||
update = rebase
|
update = rebase
|
||||||
branch = main
|
branch = main
|
||||||
|
|
||||||
|
|||||||
39
README.md
39
README.md
@@ -13,29 +13,26 @@ fork or download the repo as a zip and go from there with your own configs.
|
|||||||
### First time setup
|
### First time setup
|
||||||
|
|
||||||
1. Clone this repository to `$HOME/.dotfiles`
|
1. Clone this repository to `$HOME/.dotfiles`
|
||||||
2. `bash $HOME/.dotfiles/scripts/settler.sh`
|
2. `./install`
|
||||||
3. ???
|
3. ???
|
||||||
4. Profit
|
4. Profit
|
||||||
|
|
||||||
Note: there's a bit chicken/egg situation,
|
|
||||||
because settler assumes you don't have git,
|
|
||||||
and you need git to clone the repo. This will change soon™.
|
|
||||||
|
|
||||||
## Interesting files and locations
|
## Interesting files and locations
|
||||||
|
|
||||||
### Interesting folders
|
### Interesting folders
|
||||||
|
|
||||||
| Path | Description |
|
| Path | Description |
|
||||||
| ------------------ | --------------------------------------------------- |
|
| ------------------- | -------------------------------------------- |
|
||||||
| `.github` | GitHub Repository configuration files. |
|
| `.github` | GitHub Repository configuration files. |
|
||||||
| `host-{hostname}/` | Configurations that should apply to that host only. |
|
| `hosts/{hostname}/` | Configs that should apply to that host only. |
|
||||||
| `local/bin` | Helper scripts that I've collected or wrote. |
|
| `local/bin` | Helper scripts that I've collected or wrote. |
|
||||||
| `scripts` | Setup scripts. |
|
| `scripts` | Setup scripts. |
|
||||||
|
|
||||||
### dotfile folders
|
### dotfile folders
|
||||||
|
|
||||||
| Repo | Destination | Description |
|
| Repo | Destination | Description |
|
||||||
| --------- | ----------- | ------------------------------------------- |
|
| --------- | ----------- | ------------------------------------------- |
|
||||||
|
| `base/` | `.*` | `$HOME` level files. |
|
||||||
| `config/` | `.config/` | Configurations for applications. |
|
| `config/` | `.config/` | Configurations for applications. |
|
||||||
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
| `local/` | `.local/` | XDG Base folder: `bin`, `share` and `state` |
|
||||||
| `ssh/` | `.ssh/` | SSH Configurations. |
|
| `ssh/` | `.ssh/` | SSH Configurations. |
|
||||||
@@ -44,13 +41,6 @@ and you need git to clone the repo. This will change soon™.
|
|||||||
|
|
||||||
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
`.local/bin/dfm` is a shell script that has some tools that help with dotfiles management.
|
||||||
|
|
||||||
### `scripts/install-dotfiles.sh` - dotfiles linker
|
|
||||||
|
|
||||||
The `scripts/install-dotfiles.sh` is a `rcm` generated shell script
|
|
||||||
that does all the necessary linking.
|
|
||||||
|
|
||||||
To refresh the file, you can run `dfm dotfiles update`
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
|
The folder structure follows [XDG Base Directory Specification][xdg] where possible.
|
||||||
@@ -59,11 +49,12 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
|
|||||||
|
|
||||||
| Var | Default |
|
| Var | Default |
|
||||||
| ------------------ | -------------------- |
|
| ------------------ | -------------------- |
|
||||||
| Executables | `$HOME/.local/bin` |
|
|
||||||
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
|
| `$XDG_DATA_HOME` | `$HOME/.local/share` |
|
||||||
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
|
| `$XDG_STATE_HOME` | `$HOME/.local/state` |
|
||||||
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
|
| `$XDG_CONFIG_HOME` | `$HOME/.config` |
|
||||||
|
| `$XDG_BIN_HOME` | `$HOME/.local/bin` |
|
||||||
|
|
||||||
|
- `$XDG_BIN_HOME` is a custom `env` for `.local/bin` folder.
|
||||||
- `$XDG_DATA_HOME` defines the base directory relative to which user-specific data
|
- `$XDG_DATA_HOME` defines the base directory relative to which user-specific data
|
||||||
files should be stored. If `$XDG_DATA_HOME` is either not set or empty,
|
files should be stored. If `$XDG_DATA_HOME` is either not set or empty,
|
||||||
a default equal to `$HOME/.local/share` should be used.
|
a default equal to `$HOME/.local/share` should be used.
|
||||||
@@ -95,9 +86,9 @@ The folder structure follows [XDG Base Directory Specification][xdg] where possi
|
|||||||
|
|
||||||
### Interesting dotfiles repos
|
### Interesting dotfiles repos
|
||||||
|
|
||||||
- [https://dotfiles.github.io/inspiration/](dotfiles.github.io/inspiration)
|
- [dotfiles.github.io/inspiration/](https://dotfiles.github.io/inspiration)
|
||||||
- [https://github.com/frdmn/dotfiles](github.com/frdmn/dotfiles) - Ansible-based
|
- [frdmn/dotfiles](https://github.com/github.com/frdmn/dotfiles) - Ansible-based
|
||||||
dotfile setup for macOS
|
dotfile setup for macOS
|
||||||
- [https://github.com/mvdan/dotfiles](mvdan/dotfiles) - Here be dragons
|
- [mvdan/dotfiles](https://github.com/mvdan/dotfiles) - Here be dragons
|
||||||
- [https://github.com/vsouza/dotfiles](vsouza/dotfiles) - 🏡 My dotfiles
|
- [vsouza/dotfiles](https://github.com/vsouza/dotfiles) - 🏡 My dotfiles
|
||||||
- [https://github.com/freekmurze/dotfiles](freekmurze/dotfiles) - My personal dotfiles
|
- [freekmurze/dotfiles](https://github.com/freekmurze/dotfiles) - My personal dotfiles
|
||||||
|
|||||||
113
base/bashrc
Normal file
113
base/bashrc
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
# 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()
|
||||||
|
{
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# 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"
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Fig pre block. Keep at the top of this file.
|
|
||||||
[[ -f "$HOME/.fig/shell/bash_profile.pre.bash" ]] && builtin source "$HOME/.fig/shell/bash_profile.pre.bash"
|
|
||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
export PATH="$HOME/.local/bin:/usr/local/sbin:$PATH"
|
|
||||||
|
|
||||||
# Fig post block. Keep at the bottom of this file.
|
|
||||||
[[ -f "$HOME/.fig/shell/bash_profile.post.bash" ]] && builtin source "$HOME/.fig/shell/bash_profile.post.bash"
|
|
||||||
21
bashrc
21
bashrc
@@ -1,21 +0,0 @@
|
|||||||
# shellcheck shell=bash
|
|
||||||
|
|
||||||
# Fig pre block. Keep at the top of this file.
|
|
||||||
[[ -f "$HOME/.fig/shell/bashrc.pre.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.pre.bash"
|
|
||||||
|
|
||||||
if command -v brew &> /dev/null; then
|
|
||||||
PHP_PATH=$(brew --prefix php)/bin
|
|
||||||
export PATH="$PHP_PATH:$HOME/.composer/vendor/bin/:/usr/local/sbin:$PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if command -v nvm &> /dev/null; then
|
|
||||||
export NVM_DIR="$HOME/.nvm"
|
|
||||||
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
|
|
||||||
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Fig post block. Keep at the bottom of this file.
|
|
||||||
[[ -f "$HOME/.fig/shell/bashrc.post.bash" ]] && builtin source "$HOME/.fig/shell/bashrc.post.bash"
|
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
||||||
Submodule config/astronvim/lua/user updated: a4af0e0e98...df9530784f
@@ -55,7 +55,7 @@
|
|||||||
recurse = true
|
recurse = true
|
||||||
[credential "https://github.com"]
|
[credential "https://github.com"]
|
||||||
helper =
|
helper =
|
||||||
helper = !/usr/bin/gh auth git-credential
|
helper = !/opt/homebrew/bin/gh auth git-credential
|
||||||
[credential "https://gist.github.com"]
|
[credential "https://gist.github.com"]
|
||||||
helper =
|
helper =
|
||||||
helper = !/usr/bin/gh auth git-credential
|
helper = !/opt/homebrew/bin/gh auth git-credential
|
||||||
|
|||||||
1
dotbot
Submodule
1
dotbot
Submodule
Submodule dotbot added at 328bcb3259
1
dotbot-plugins/dotbot-brew
Submodule
1
dotbot-plugins/dotbot-brew
Submodule
Submodule dotbot-plugins/dotbot-brew added at 98e346360b
1
dotbot-plugins/dotbot-gh-extension
Submodule
1
dotbot-plugins/dotbot-gh-extension
Submodule
Submodule dotbot-plugins/dotbot-gh-extension added at 037994ef28
1
dotbot-plugins/dotbot-golang
Submodule
1
dotbot-plugins/dotbot-golang
Submodule
Submodule dotbot-plugins/dotbot-golang added at 4fa60bd487
1
dotbot-plugins/dotbot-if
Submodule
1
dotbot-plugins/dotbot-if
Submodule
Submodule dotbot-plugins/dotbot-if added at 2b4dc56943
@@ -1,3 +1,3 @@
|
|||||||
# .dotfiles/host-air
|
# .dotfiles/hosts/air
|
||||||
|
|
||||||
This is my home computer.
|
This is my home computer.
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
# .dotfiles/host-v
|
# .dotfiles/hosts/v
|
||||||
|
|
||||||
This is my work computer.
|
This is my work computer.
|
||||||
23
install
Executable file
23
install
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
CONFIG="install.conf.yaml"
|
||||||
|
DOTBOT_DIR="dotbot"
|
||||||
|
|
||||||
|
DOTBOT_BIN="bin/dotbot"
|
||||||
|
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
cd "$BASEDIR"
|
||||||
|
git submodule sync --quiet --recursive
|
||||||
|
git submodule update --init --recursive
|
||||||
|
|
||||||
|
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" \
|
||||||
|
-d "${BASEDIR}" \
|
||||||
|
--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 \
|
||||||
|
-p dotbot-plugins/dotbot-if/if.py \
|
||||||
|
-c "${CONFIG}" \
|
||||||
|
"${@}"
|
||||||
118
install.conf.yaml
Normal file
118
install.conf.yaml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
---
|
||||||
|
- defaults:
|
||||||
|
brew:
|
||||||
|
stderr: true
|
||||||
|
stdout: true
|
||||||
|
brewfile:
|
||||||
|
stderr: true
|
||||||
|
stdout: true
|
||||||
|
link:
|
||||||
|
create: true
|
||||||
|
relink: true
|
||||||
|
|
||||||
|
- clean:
|
||||||
|
~/:
|
||||||
|
~/.config:
|
||||||
|
recursive: true
|
||||||
|
~/.local:
|
||||||
|
recursive: true
|
||||||
|
|
||||||
|
- create:
|
||||||
|
~/.config:
|
||||||
|
~/.local:
|
||||||
|
~/.local/share:
|
||||||
|
~/.local/state:
|
||||||
|
~/.ssh:
|
||||||
|
mode: 700
|
||||||
|
~/Code:
|
||||||
|
|
||||||
|
- link:
|
||||||
|
~/.config/:
|
||||||
|
glob: true
|
||||||
|
path: config/**
|
||||||
|
~/.local/bin/:
|
||||||
|
glob: true
|
||||||
|
path: local/bin/**
|
||||||
|
~/.ssh/:
|
||||||
|
force: true
|
||||||
|
glob: true
|
||||||
|
mode: 600
|
||||||
|
path: ssh/**
|
||||||
|
~/:
|
||||||
|
force: true
|
||||||
|
glob: true
|
||||||
|
path: base/**
|
||||||
|
prefix: '.'
|
||||||
|
|
||||||
|
- shell:
|
||||||
|
- [git submodule update --init --recursive --force]
|
||||||
|
- [bash scripts/set-macos-defaults.sh]
|
||||||
|
- [bash scripts/install-npm-packages.sh]
|
||||||
|
|
||||||
|
- brewfile:
|
||||||
|
- Brewfile
|
||||||
|
|
||||||
|
- go:
|
||||||
|
- github.com/skx/sysbox@latest
|
||||||
|
|
||||||
|
# hosts: air
|
||||||
|
- if:
|
||||||
|
- cond: '[[ $(hostname) = air ]]'
|
||||||
|
met:
|
||||||
|
- go:
|
||||||
|
- github.com/skx/sysbox@latest
|
||||||
|
|
||||||
|
# hosts: v
|
||||||
|
- if:
|
||||||
|
- cond: '[[ $(hostname) = v ]]'
|
||||||
|
met:
|
||||||
|
- link:
|
||||||
|
~/.config/:
|
||||||
|
glob: true
|
||||||
|
force: true
|
||||||
|
path: hosts/v/config/**
|
||||||
|
- go:
|
||||||
|
- github.com/skx/sysbox@latest
|
||||||
|
|
||||||
|
# hosts: lakka
|
||||||
|
- if:
|
||||||
|
- cond: '[[ $(hostname) = lakka ]]'
|
||||||
|
met:
|
||||||
|
- link:
|
||||||
|
~/.irssi/*:
|
||||||
|
force: true
|
||||||
|
glob: true
|
||||||
|
path: hosts/lakka/irssi/**
|
||||||
|
~/.zshrc*:
|
||||||
|
force: true
|
||||||
|
path: hosts/lakka/zshrc
|
||||||
|
|
||||||
|
# GitHub CLI Extensions
|
||||||
|
- ghe:
|
||||||
|
# GitHub CLI extension for generating a report on repository dependencies.
|
||||||
|
- andyfeller/gh-dependency-report
|
||||||
|
# GitHub CLI extension to generate montage from GitHub user avatars
|
||||||
|
- andyfeller/gh-montage
|
||||||
|
# An opinionated GitHub Cli extension for creating
|
||||||
|
# changelogs that adhere to the keep a changelog specification.
|
||||||
|
- chelnak/gh-changelog
|
||||||
|
# Safely deletes local branches with no upstream and no un-pushed commits
|
||||||
|
- davidraviv/gh-clean-branches
|
||||||
|
# A beautiful CLI dashboard for GitHub 🚀
|
||||||
|
- dlvhdr/gh-dash
|
||||||
|
# GitHub CLI extension for reviewing Dependabot PRs.
|
||||||
|
- einride/gh-dependabot
|
||||||
|
# A GitHub CLI extension that provides summary pull request metrics.
|
||||||
|
- hectcastro/gh-metrics
|
||||||
|
# A github-cli extension script to clone all repositories
|
||||||
|
# in an organization, optionally filtering by topic.
|
||||||
|
- matt-bartel/gh-clone-org
|
||||||
|
# being an extension to view the overall health of an organization's use of actions
|
||||||
|
- rsese/gh-actions-status
|
||||||
|
- samcoe/gh-triage
|
||||||
|
# Generate account/organization/enterprise reports
|
||||||
|
- stoe/gh-report
|
||||||
|
# Organisation specific extension for gh cli to retrieve different statistics
|
||||||
|
- VildMedPap/gh-orgstats
|
||||||
|
- vilmibm/gh-screensaver
|
||||||
|
- vilmibm/gh-user-status
|
||||||
@@ -25,9 +25,9 @@ Some problematic code has been fixed per `shellcheck` suggestions.
|
|||||||
| `x-when-up` | skx/sysadmin-util |
|
| `x-when-up` | skx/sysadmin-util |
|
||||||
|
|
||||||
- Sources:
|
- Sources:
|
||||||
- [skx/sysadmin-utils](https://github.com/skx/sysadmin-util/)
|
- [skx/sysadmin-utils](https://github.com/skx/sysadmin-util/)
|
||||||
- Tools for Linux/Unix sysadmins.
|
- Tools for Linux/Unix sysadmins.
|
||||||
- [Licence](https://github.com/skx/sysadmin-util/blob/master/LICENSE)
|
- [Licence](https://github.com/skx/sysadmin-util/blob/master/LICENSE)
|
||||||
- onnimonni
|
- [onnimonni](https://github.com/onnimonni)
|
||||||
- https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1
|
- [validate_sha256sum](https://gist.github.com/onnimonni/b49779ebc96216771a6be3de46449fa1)
|
||||||
- [mvdan/dotfiles](https://github.com/mvdan/dotfiles)
|
- [mvdan/dotfiles](https://github.com/mvdan/dotfiles)
|
||||||
|
|||||||
118
local/bin/dfm
118
local/bin/dfm
@@ -11,40 +11,13 @@
|
|||||||
: "${DOTFILES:=$HOME/.dotfiles}"
|
: "${DOTFILES:=$HOME/.dotfiles}"
|
||||||
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
|
: "${INSTALL_SCRIPT:=$DOTFILES/scripts/install-dotfiles.sh}"
|
||||||
: "${BREWFILE:=$DOTFILES/Brewfile}"
|
: "${BREWFILE:=$DOTFILES/Brewfile}"
|
||||||
|
: "${HOSTFILES:=$DOTFILES/hosts}"
|
||||||
|
|
||||||
SCRIPT=$(basename "$0")
|
SCRIPT=$(basename "$0")
|
||||||
|
|
||||||
# shellcheck source=./../../scripts/shared.sh
|
# shellcheck source=./../../scripts/shared.sh
|
||||||
source "$DOTFILES/scripts/shared.sh"
|
source "$DOTFILES/scripts/shared.sh"
|
||||||
|
|
||||||
function section_reset
|
|
||||||
{
|
|
||||||
USAGE_PREFIX="$SCRIPT reset"
|
|
||||||
case "$1" in
|
|
||||||
all)
|
|
||||||
msg_ok "Running all reset commands"
|
|
||||||
$0 reset nvim
|
|
||||||
;;
|
|
||||||
nvim)
|
|
||||||
rm -rf ~/.local/share/nvim ~/.local/state/nvim ~/.cache/nvim ~/.config/astronvim ~/.config/nvim
|
|
||||||
msg_ok "Deleted old nvim files"
|
|
||||||
ln -s ~/.dotfiles/config/astronvim ~/.config/astronvim
|
|
||||||
ln -s ~/.dotfiles/config/nvim ~/.config/nvim
|
|
||||||
msg_ok "Linked nvim and astronvim"
|
|
||||||
hash brew 2>/dev/null && $0 install brew
|
|
||||||
hash go 2>/dev/null && $0 install ext_go
|
|
||||||
hash npm 2>/dev/null && $0 install ext_npm
|
|
||||||
msg_ok "Installed packages"
|
|
||||||
msg_done "...and we are done!"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
menu_section "$USAGE_PREFIX" "all | nvim"
|
|
||||||
menu_item "all" "Reset everything, runs all configured reset actions"
|
|
||||||
menu_item "nvim" "Resets nvim. Deletes caches, removes nvim folders and relinks nvim folders"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
function section_install
|
function section_install
|
||||||
{
|
{
|
||||||
USAGE_PREFIX="$SCRIPT install"
|
USAGE_PREFIX="$SCRIPT install"
|
||||||
@@ -52,35 +25,31 @@ function section_install
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
all)
|
all)
|
||||||
$0 install antigen
|
$0 install antigen
|
||||||
|
$0 install starship
|
||||||
$0 install macos
|
$0 install macos
|
||||||
$0 install ext_gh
|
$0 install npm
|
||||||
$0 install ext_go
|
|
||||||
;;
|
;;
|
||||||
antigen)
|
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!"
|
||||||
;;
|
;;
|
||||||
|
starship)
|
||||||
|
curl -sS https://starship.rs/install.sh | sh && msg_done "🎉 starship installed!"
|
||||||
|
;;
|
||||||
macos)
|
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!"
|
||||||
;;
|
;;
|
||||||
ext_go)
|
npm)
|
||||||
bash "$DOTFILES/scripts/install-go-packages.sh" && msg_done "🎉 Go packages have been installed!"
|
|
||||||
;;
|
|
||||||
ext_gh)
|
|
||||||
bash "$DOTFILES/scripts/install-gh-extensions.sh" && msg_done "🎉 Extensions for GitHub CLI have been installed!"
|
|
||||||
;;
|
|
||||||
ext_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)
|
settler)
|
||||||
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Settler has been run!"
|
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Settler has been run!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "all | antigen | ext_gh | ext_go | ext_npm | macos | settler"
|
menu_section "$USAGE_PREFIX" "all | antigen | starship | npm | macos | settler"
|
||||||
menu_item "all" "Installs antigen, macos, brew, ext_gh and ext_go"
|
menu_item "all" "Installs antigen, macos, brew and ext_gh"
|
||||||
menu_item "antigen" "Updates the antigen.zsh file"
|
menu_item "antigen" "Updates the antigen.zsh file"
|
||||||
menu_item "ext_gh" "Install GitHub CLI Extensions"
|
menu_item "starship" "Install starship.rs"
|
||||||
menu_item "ext_go" "Install Go Packages"
|
menu_item "npm" "Install NPM Packages"
|
||||||
menu_item "ext_npm" "Install NPM Packages"
|
|
||||||
menu_item "macos" "Setup nice macOS defaults"
|
menu_item "macos" "Setup nice macOS defaults"
|
||||||
menu_item "settler" "Runs the WIP settler.sh"
|
menu_item "settler" "Runs the WIP settler.sh"
|
||||||
;;
|
;;
|
||||||
@@ -129,18 +98,24 @@ function section_dotfiles
|
|||||||
USAGE_PREFIX="$SCRIPT dotfiles"
|
USAGE_PREFIX="$SCRIPT dotfiles"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
link)
|
reset_all)
|
||||||
rcup -B "$HOSTNAME" -f -v && msg_done "🎉 dotfiles have been linked!"
|
msg_ok "Running all reset commands"
|
||||||
|
$0 dotfiles reset_nvim
|
||||||
;;
|
;;
|
||||||
update)
|
reset_nvim)
|
||||||
# Updates .dotfiles/scripts/install.sh and formats it
|
rm -rf \
|
||||||
rcup -B 0 -g \
|
~/.local/share/nvim \
|
||||||
| tee "$INSTALL_SCRIPT" 1> /dev/null \
|
~/.local/state/nvim \
|
||||||
&& sed -i '' "s|$HOME|\$HOME|g" "$INSTALL_SCRIPT" \
|
~/.cache/nvim \
|
||||||
&& sed -i '' "s|install.sh|$(basename "$INSTALL_SCRIPT")|g" "$INSTALL_SCRIPT"
|
~/.config/astronvim \
|
||||||
$0 dotfiles shfmt
|
~/.config/nvim
|
||||||
$0 dotfiles link
|
msg_ok "Deleted old nvim files"
|
||||||
msg_done "🎉 dotfiles updated and linked!"
|
ln -s ~/.dotfiles/config/astronvim ~/.config/astronvim
|
||||||
|
ln -s ~/.dotfiles/config/nvim ~/.config/nvim
|
||||||
|
msg_ok "Linked nvim and astronvim"
|
||||||
|
hash npm 2>/dev/null && $0 install npm
|
||||||
|
msg_ok "Installed packages"
|
||||||
|
msg_done "...and we are done!"
|
||||||
;;
|
;;
|
||||||
shfmt)
|
shfmt)
|
||||||
# Format shell scripts according to following rules.
|
# Format shell scripts according to following rules.
|
||||||
@@ -150,14 +125,37 @@ function section_dotfiles
|
|||||||
msg_done "🎉 dotfiles have been formatted!"
|
msg_done "🎉 dotfiles have been formatted!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "link | update | shfmt"
|
menu_section "$USAGE_PREFIX" "reset_all | reset_nvim | shfmt"
|
||||||
menu_item "link" "Use rcrc to update dotfile links"
|
menu_item "reset_all" "Reset everything, runs all configured reset actions"
|
||||||
menu_item "update" "Updates dotfile links (scripts/install.sh), formats it and runs it."
|
menu_item "reset_nvim" "Resets nvim. Deletes caches, removes nvim folders and relinks nvim folders"
|
||||||
menu_item "shfmt" "Run shfmt to all dotfiles"
|
menu_item "shfmt" "Run shfmt to all dotfiles"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function section_check
|
||||||
|
{
|
||||||
|
USAGE_PREFIX="$SCRIPT check"
|
||||||
|
X_HOSTNAME=$(hostname)
|
||||||
|
X_ARCH=$(uname)
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
a|arch)
|
||||||
|
[[ "$2" = "" ]] && echo "$X_ARCH" && exit 0
|
||||||
|
[[ $X_ARCH = "$2" ]] && exit 0 || exit 1
|
||||||
|
;;
|
||||||
|
h|host|hostname)
|
||||||
|
[[ "$2" = "" ]] && echo "$X_HOSTNAME" && exit 0
|
||||||
|
[[ $X_HOSTNAME = "$2" ]] && exit 0 || exit 1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
menu_section "$USAGE_PREFIX" "arch | host"
|
||||||
|
menu_item "arch <arch>" "Empty returns current. Exit code 0 when match, 1 when not."
|
||||||
|
menu_item "host <host>" "Empty returns current. Exit code 0 when match, 1 when not."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
# Secret menu for visual tests
|
# Secret menu for visual tests
|
||||||
function section_tests
|
function section_tests
|
||||||
{
|
{
|
||||||
@@ -186,23 +184,23 @@ function section_tests
|
|||||||
function usage
|
function usage
|
||||||
{
|
{
|
||||||
echo ""
|
echo ""
|
||||||
menu_section "Usage: $SCRIPT" "install | reset | brew | dotfiles"
|
menu_section "Usage: $SCRIPT" "install | reset | brew | check | dotfiles"
|
||||||
echo $" All commands have their own subcommands."
|
echo $" All commands have their own subcommands."
|
||||||
echo ""
|
echo ""
|
||||||
section_install
|
section_install
|
||||||
echo ""
|
echo ""
|
||||||
section_reset
|
|
||||||
echo ""
|
|
||||||
section_brew
|
section_brew
|
||||||
echo ""
|
echo ""
|
||||||
|
section_check
|
||||||
|
echo ""
|
||||||
section_dotfiles
|
section_dotfiles
|
||||||
}
|
}
|
||||||
|
|
||||||
# The main loop. first keyword after $0 triggers section, or help.
|
# The main loop. first keyword after $0 triggers section, or help.
|
||||||
case "$1" in
|
case "$1" in
|
||||||
install) section_install "$2" ;;
|
install) section_install "$2" ;;
|
||||||
reset) section_reset "$2" ;;
|
|
||||||
brew) section_brew "$2" ;;
|
brew) section_brew "$2" ;;
|
||||||
|
check) section_check "$2" ;;
|
||||||
dotfiles) section_dotfiles "$2" ;;
|
dotfiles) section_dotfiles "$2" ;;
|
||||||
tests) section_tests "$2" ;;
|
tests) section_tests "$2" ;;
|
||||||
*) usage && exit 0 ;;
|
*) usage && exit 0 ;;
|
||||||
|
|||||||
2
rcrc
2
rcrc
@@ -1,2 +0,0 @@
|
|||||||
EXCLUDES="*.md *.sh *.lock.json Brewfile scripts *-secret xbar .github"
|
|
||||||
HOSTNAME=$(hostname -s)
|
|
||||||
@@ -1,151 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
#
|
|
||||||
# sh install-dotfiles.sh
|
|
||||||
#
|
|
||||||
# Environment variables: VERBOSE, CP, LN, MKDIR, RM, DIRNAME.
|
|
||||||
#
|
|
||||||
# env VERBOSE=1 sh install-dotfiles.sh
|
|
||||||
#
|
|
||||||
# DO NOT EDIT THIS FILE
|
|
||||||
#
|
|
||||||
# This file is generated by rcm(7) as:
|
|
||||||
#
|
|
||||||
# rcup -B 0 -g
|
|
||||||
#
|
|
||||||
# To update it, re-run the above command.
|
|
||||||
#
|
|
||||||
: ${VERBOSE:=0}
|
|
||||||
: ${CP:=/bin/cp}
|
|
||||||
: ${LN:=/bin/ln}
|
|
||||||
: ${MKDIR:=/bin/mkdir}
|
|
||||||
: ${RM:=/bin/rm}
|
|
||||||
: ${DIRNAME:=/usr/bin/dirname}
|
|
||||||
verbose() {
|
|
||||||
if [ "$VERBOSE" -gt 0 ]; then
|
|
||||||
echo "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
handle_file_cp() {
|
|
||||||
if [ -e "$2" ]; then
|
|
||||||
printf "%s " "overwrite $2? [yN]"
|
|
||||||
read overwrite
|
|
||||||
case "$overwrite" in
|
|
||||||
y)
|
|
||||||
$RM -rf "$2"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "skipping $2"
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
verbose "'$1' -> '$2'"
|
|
||||||
$MKDIR -p "$($DIRNAME "$2")"
|
|
||||||
$CP -R "$1" "$2"
|
|
||||||
}
|
|
||||||
handle_file_ln() {
|
|
||||||
if [ -e "$2" ]; then
|
|
||||||
printf "%s " "overwrite $2? [yN]"
|
|
||||||
read overwrite
|
|
||||||
case "$overwrite" in
|
|
||||||
y)
|
|
||||||
$RM -rf "$2"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "skipping $2"
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
verbose "'$1' -> '$2'"
|
|
||||||
$MKDIR -p "$($DIRNAME "$2")"
|
|
||||||
$LN -sf "$1" "$2"
|
|
||||||
}
|
|
||||||
handle_file_ln "$HOME/.dotfiles/bash_profile" "$HOME/.bash_profile"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/bashrc" "$HOME/.bashrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/alias" "$HOME/.config/alias"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/astronvim/lua/user/LICENSE" "$HOME/.config/astronvim/lua/user/LICENSE"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/astronvim/lua/user/init.lua" "$HOME/.config/astronvim/lua/user/init.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/exports" "$HOME/.config/exports"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/flipperdevices.com/qFlipper.ini" "$HOME/.config/flipperdevices.com/qFlipper.ini"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/functions" "$HOME/.config/functions"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/gh/config.yml" "$HOME/.config/gh/config.yml"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/config" "$HOME/.config/git/config"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/git/gitignore" "$HOME/.config/git/gitignore"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/LICENSE" "$HOME/.config/nvim/LICENSE"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/config.ld" "$HOME/.config/nvim/config.ld"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/init.lua" "$HOME/.config/nvim/init.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/autocmds.lua" "$HOME/.config/nvim/lua/core/autocmds.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/bootstrap.lua" "$HOME/.config/nvim/lua/core/bootstrap.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/icons/nerd_font.lua" "$HOME/.config/nvim/lua/core/icons/nerd_font.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/icons/text.lua" "$HOME/.config/nvim/lua/core/icons/text.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/lazy.lua" "$HOME/.config/nvim/lua/core/lazy.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/mappings.lua" "$HOME/.config/nvim/lua/core/mappings.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/options.lua" "$HOME/.config/nvim/lua/core/options.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/buffer.lua" "$HOME/.config/nvim/lua/core/utils/buffer.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/ffi.lua" "$HOME/.config/nvim/lua/core/utils/ffi.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/git.lua" "$HOME/.config/nvim/lua/core/utils/git.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/init.lua" "$HOME/.config/nvim/lua/core/utils/init.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/lsp.lua" "$HOME/.config/nvim/lua/core/utils/lsp.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/mason.lua" "$HOME/.config/nvim/lua/core/utils/mason.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/status.lua" "$HOME/.config/nvim/lua/core/utils/status.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/ui.lua" "$HOME/.config/nvim/lua/core/utils/ui.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/core/utils/updater.lua" "$HOME/.config/nvim/lua/core/utils/updater.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/lazy_snapshot.lua" "$HOME/.config/nvim/lua/lazy_snapshot.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/alpha.lua" "$HOME/.config/nvim/lua/plugins/alpha.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/cmp.lua" "$HOME/.config/nvim/lua/plugins/cmp.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/alpha.lua" "$HOME/.config/nvim/lua/plugins/configs/alpha.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/guess-indent.lua" "$HOME/.config/nvim/lua/plugins/configs/guess-indent.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/heirline.lua" "$HOME/.config/nvim/lua/plugins/configs/heirline.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/lspconfig.lua" "$HOME/.config/nvim/lua/plugins/configs/lspconfig.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/lspkind.lua" "$HOME/.config/nvim/lua/plugins/configs/lspkind.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/luasnip.lua" "$HOME/.config/nvim/lua/plugins/configs/luasnip.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason-lspconfig.lua" "$HOME/.config/nvim/lua/plugins/configs/mason-lspconfig.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason-null-ls.lua" "$HOME/.config/nvim/lua/plugins/configs/mason-null-ls.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason-nvim-dap.lua" "$HOME/.config/nvim/lua/plugins/configs/mason-nvim-dap.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/mason.lua" "$HOME/.config/nvim/lua/plugins/configs/mason.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/notify.lua" "$HOME/.config/nvim/lua/plugins/configs/notify.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-autopairs.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-autopairs.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-dap-ui.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-dap-ui.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-treesitter.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-treesitter.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/nvim-web-devicons.lua" "$HOME/.config/nvim/lua/plugins/configs/nvim-web-devicons.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/telescope.lua" "$HOME/.config/nvim/lua/plugins/configs/telescope.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/configs/which-key.lua" "$HOME/.config/nvim/lua/plugins/configs/which-key.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/core.lua" "$HOME/.config/nvim/lua/plugins/core.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/dap.lua" "$HOME/.config/nvim/lua/plugins/dap.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/git.lua" "$HOME/.config/nvim/lua/plugins/git.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/heirline.lua" "$HOME/.config/nvim/lua/plugins/heirline.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/lsp.lua" "$HOME/.config/nvim/lua/plugins/lsp.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/mason.lua" "$HOME/.config/nvim/lua/plugins/mason.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/neo-tree.lua" "$HOME/.config/nvim/lua/plugins/neo-tree.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/telescope.lua" "$HOME/.config/nvim/lua/plugins/telescope.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/treesitter.lua" "$HOME/.config/nvim/lua/plugins/treesitter.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/plugins/ui.lua" "$HOME/.config/nvim/lua/plugins/ui.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/nvim/lua/user_example/init.lua" "$HOME/.config/nvim/lua/user_example/init.lua"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/starship.toml" "$HOME/.config/starship.toml"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/tmux/tmux.conf" "$HOME/.config/tmux/tmux.conf"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/config/wtf/config.yml" "$HOME/.config/wtf/config.yml"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/ecrc" "$HOME/.ecrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/git_profiles" "$HOME/.git_profiles"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/huskyrc" "$HOME/.huskyrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/antigen.zsh" "$HOME/.local/bin/antigen.zsh"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/dfm" "$HOME/.local/bin/dfm"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/git-dirty" "$HOME/.local/bin/git-dirty"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-check-git-attributes" "$HOME/.local/bin/x-check-git-attributes"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-dupes.pl" "$HOME/.local/bin/x-dupes.pl"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-foreach" "$HOME/.local/bin/x-foreach"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-multi-ping.pl" "$HOME/.local/bin/x-multi-ping.pl"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-open-ports" "$HOME/.local/bin/x-open-ports"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-ssl-expiry-date" "$HOME/.local/bin/x-ssl-expiry-date"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-error" "$HOME/.local/bin/x-until-error"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-until-success" "$HOME/.local/bin/x-until-success"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-down" "$HOME/.local/bin/x-when-down"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/local/bin/x-when-up" "$HOME/.local/bin/x-when-up"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/rcrc" "$HOME/.rcrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/shellcheckrc" "$HOME/.shellcheckrc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/ssh/allowed_signers" "$HOME/.ssh/allowed_signers"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/ssh/config" "$HOME/.ssh/config"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/vuerc" "$HOME/.vuerc"
|
|
||||||
handle_file_ln "$HOME/.dotfiles/zshrc" "$HOME/.zshrc"
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# Install GitHub CLI extensions
|
|
||||||
#
|
|
||||||
# shellcheck source="shared.sh"
|
|
||||||
source "$HOME/.dotfiles/scripts/shared.sh"
|
|
||||||
|
|
||||||
if ! command -v gh &> /dev/null; then
|
|
||||||
msg_run "gh (GitHub Client) could not be found, please install it first"
|
|
||||||
else
|
|
||||||
extensions=(
|
|
||||||
# GitHub CLI extension for reviewing Dependabot PRs.
|
|
||||||
einride/gh-dependabot
|
|
||||||
# A GitHub CLI extension that provides summary pull request metrics.
|
|
||||||
hectcastro/gh-metrics
|
|
||||||
# being an extension to view the overall health of an organization's use of actions
|
|
||||||
rsese/gh-actions-status
|
|
||||||
# GitHub CLI extension for label management
|
|
||||||
heaths/gh-label
|
|
||||||
# An opinionated GitHub Cli extension for creating
|
|
||||||
# changelogs that adhere to the keep a changelog specification.
|
|
||||||
chelnak/gh-changelog
|
|
||||||
# Safely deletes local branches with no upstream and no un-pushed commits
|
|
||||||
davidraviv/gh-clean-branches
|
|
||||||
# A beautiful CLI dashboard for GitHub 🚀
|
|
||||||
dlvhdr/gh-dash
|
|
||||||
# A github-cli extension script to clone all repositories
|
|
||||||
# in an organization, optionally filtering by topic.
|
|
||||||
matt-bartel/gh-clone-org
|
|
||||||
# GitHub CLI extension to generate montage from GitHub user avatars
|
|
||||||
andyfeller/gh-montage
|
|
||||||
# Organisation specific extension for gh cli to retrieve different statistics
|
|
||||||
VildMedPap/gh-orgstats
|
|
||||||
# GitHub CLI extension for generating a report on repository dependencies.
|
|
||||||
andyfeller/gh-dependency-report
|
|
||||||
# gh cli extension to generate account/organization/enterprise reports
|
|
||||||
stoe/gh-report
|
|
||||||
)
|
|
||||||
|
|
||||||
msg "Starting to install GitHub CLI extensions..."
|
|
||||||
|
|
||||||
for ext in "${extensions[@]}"; do
|
|
||||||
# Trim spaces
|
|
||||||
ext=${ext// /}
|
|
||||||
# Skip comments
|
|
||||||
if [[ ${ext:0:1} == "#" ]]; then continue; fi
|
|
||||||
|
|
||||||
msg_run "Installing $ext"
|
|
||||||
gh extensions install "$ext"
|
|
||||||
echo ""
|
|
||||||
done
|
|
||||||
|
|
||||||
msg_ok "Done"
|
|
||||||
fi
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#!/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
|
|
||||||
)
|
|
||||||
|
|
||||||
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
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Settler - my macOS setup automator
|
# Install XCode CLI Tools with osascript magic.
|
||||||
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
|
# Ismo Vuorinen <https://github.com/ivuorinen> 2018
|
||||||
#
|
#
|
||||||
|
|
||||||
@@ -36,26 +36,3 @@ until [ "$(which git)" ]; do
|
|||||||
echo -n "."
|
echo -n "."
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
# Install brew
|
|
||||||
if [ "$(which brew)" ]; then
|
|
||||||
echo 'Brew already installed'
|
|
||||||
else
|
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
bash "$HOME/.dotfiles/local/bin/dfm" brew install && "Installed Brewfile contents"
|
|
||||||
bash "$HOME/.dotfiles/local/bin/dfm" dotfiles link && "Linked all dotfiles"
|
|
||||||
|
|
||||||
read -r -p "Do you want to set macOS defaults? (y/N) " yn
|
|
||||||
|
|
||||||
case $yn in
|
|
||||||
[yY])
|
|
||||||
bash "set-defaults.sh"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Skipping..."
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "Done. Note that some of these changes require a logout/restart to take effect."
|
|
||||||
15
ssh/config
15
ssh/config
@@ -1,16 +1,7 @@
|
|||||||
Host github.com
|
Host github.com
|
||||||
User git
|
User git
|
||||||
HostName github.com
|
|
||||||
IdentityFile ~/.ssh/id_rsa
|
|
||||||
|
|
||||||
Host bitbucket.com
|
|
||||||
Hostname bitbucket.com
|
|
||||||
IdentityFile ~/.ssh/id_rsa
|
|
||||||
|
|
||||||
Host gitlab.com
|
|
||||||
Hostname gitlab.com
|
|
||||||
IdentityFile ~/.ssh/id_rsa
|
|
||||||
|
|
||||||
Host *
|
Host *
|
||||||
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
# IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||||
|
IdentityFile ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user