mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-08 12:50:45 +00:00
Host specific files should now work
This commit is contained in:
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -8,16 +8,15 @@
|
|||||||
url = https://github.com/wren/dotbot-brew.git
|
url = https://github.com/wren/dotbot-brew.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
[submodule "dotbot-if"]
|
|
||||||
path = dotbot-if
|
|
||||||
url = https://github.com/wonderbeyond/dotbot-if.git
|
|
||||||
ignore = dirty
|
|
||||||
|
|
||||||
[submodule "dotbot-gh-extension"]
|
[submodule "dotbot-gh-extension"]
|
||||||
path = dotbot-gh-extension
|
path = dotbot-gh-extension
|
||||||
url = https://github.com/fundor333/dotbot-gh-extension.git
|
url = https://github.com/fundor333/dotbot-gh-extension.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "dotbot-include"]
|
||||||
|
path = dotbot-include
|
||||||
|
url = https://gitlab.com/gnfzdz/dotbot-include.git
|
||||||
|
|
||||||
[submodule "config/nvim"]
|
[submodule "config/nvim"]
|
||||||
path = config/nvim
|
path = config/nvim
|
||||||
url = https://github.com/AstroNvim/AstroNvim.git
|
url = https://github.com/AstroNvim/AstroNvim.git
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
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-gh-extension -f https://github.com/fundor333/dotbot-gh-extension.git dotbot-gh-extension
|
||||||
git submodule add --name dotbot-if -f https://github.com/wonderbeyond/dotbot-if.git dotbot-if
|
git submodule add --name dotbot-include -f https://gitlab.com/gnfzdz/dotbot-include.git dotbot-include
|
||||||
|
|||||||
Submodule dotbot-if deleted from 2b4dc56943
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
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/**
|
||||||
0
hosts/tunkki/base/.gitkeep
Normal file
0
hosts/tunkki/base/.gitkeep
Normal file
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/**
|
||||||
17
install
17
install
@@ -8,6 +8,7 @@ DOTBOT_DIR="dotbot"
|
|||||||
DOTBOT_BIN="bin/dotbot"
|
DOTBOT_BIN="bin/dotbot"
|
||||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
|
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
|
||||||
|
DOTBOT_HOST="$(hostname -s)" || ''
|
||||||
|
|
||||||
cd "$BASEDIR"
|
cd "$BASEDIR"
|
||||||
git submodule sync --quiet --recursive
|
git submodule sync --quiet --recursive
|
||||||
@@ -17,6 +18,20 @@ git submodule update --init --recursive
|
|||||||
-d "${BASEDIR}" \
|
-d "${BASEDIR}" \
|
||||||
--plugin-dir=dotbot-brew \
|
--plugin-dir=dotbot-brew \
|
||||||
--plugin-dir=dotbot-gh-extension \
|
--plugin-dir=dotbot-gh-extension \
|
||||||
--plugin-dir=dotbot-if \
|
--plugin-dir=dotbot-include \
|
||||||
-c "${CONFIG}" \
|
-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,6 +7,7 @@ DOTBOT_DIR="dotbot"
|
|||||||
|
|
||||||
DOTBOT_BIN="bin/dotbot"
|
DOTBOT_BIN="bin/dotbot"
|
||||||
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
DOTBOT_HOST="$(hostname -s)" || ''
|
||||||
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
|
DOTBOT_BIN_PATH="${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}"
|
||||||
|
|
||||||
cd "$BASEDIR"
|
cd "$BASEDIR"
|
||||||
@@ -15,6 +16,18 @@ git submodule update --init --recursive
|
|||||||
|
|
||||||
"${DOTBOT_BIN_PATH}" \
|
"${DOTBOT_BIN_PATH}" \
|
||||||
-d "${BASEDIR}" \
|
-d "${BASEDIR}" \
|
||||||
|
--plugin-dir=dotbot-include \
|
||||||
-c "${CONFIG}" \
|
-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-include \
|
||||||
|
-c "$DOTBOT_HOST_CONFIG" \
|
||||||
|
"${@}"
|
||||||
|
fi
|
||||||
|
|||||||
@@ -1,9 +1,4 @@
|
|||||||
- defaults:
|
- include: 'hosts/defaults.yaml'
|
||||||
create:
|
|
||||||
mode: 0755
|
|
||||||
link:
|
|
||||||
create: true
|
|
||||||
exclude: ["*.md", "*renovate*"]
|
|
||||||
- clean:
|
- clean:
|
||||||
~/:
|
~/:
|
||||||
~/.config:
|
~/.config:
|
||||||
@@ -19,6 +14,11 @@
|
|||||||
mode: 0700
|
mode: 0700
|
||||||
~/Code:
|
~/Code:
|
||||||
- link:
|
- link:
|
||||||
|
~/:
|
||||||
|
force: true
|
||||||
|
glob: true
|
||||||
|
path: base/**
|
||||||
|
prefix: "."
|
||||||
~/.config/:
|
~/.config/:
|
||||||
glob: true
|
glob: true
|
||||||
path: config/**
|
path: config/**
|
||||||
@@ -30,54 +30,9 @@
|
|||||||
glob: true
|
glob: true
|
||||||
mode: 0600
|
mode: 0600
|
||||||
path: ssh/**
|
path: ssh/**
|
||||||
~/:
|
|
||||||
force: true
|
|
||||||
glob: true
|
|
||||||
path: base/**
|
|
||||||
prefix: "."
|
|
||||||
- shell:
|
- shell:
|
||||||
- [git submodule update --init --recursive --force]
|
- git submodule update --init --recursive --force
|
||||||
- bash scripts/install-go-packages.sh
|
- bash local/bin/dfm install all
|
||||||
# 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
|
|
||||||
# GitHub CLI Extensions
|
# GitHub CLI Extensions
|
||||||
- ghe:
|
- ghe:
|
||||||
# GitHub CLI extension for generating a report on repository dependencies.
|
# GitHub CLI extension for generating a report on repository dependencies.
|
||||||
|
|||||||
@@ -27,13 +27,19 @@ function section_install
|
|||||||
$0 install macos
|
$0 install macos
|
||||||
$0 install antigen
|
$0 install antigen
|
||||||
$0 install starship
|
$0 install starship
|
||||||
|
$0 brew install
|
||||||
|
$0 install composer
|
||||||
$0 install nvm
|
$0 install nvm
|
||||||
$0 install npm
|
$0 install npm
|
||||||
|
$0 install ntfy
|
||||||
;;
|
;;
|
||||||
antigen)
|
antigen)
|
||||||
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" \
|
curl -L git.io/antigen > "$DOTFILES/local/bin/antigen.zsh" \
|
||||||
&& msg_done "🎉 New antigen installed!"
|
&& msg_done "🎉 New antigen installed!"
|
||||||
;;
|
;;
|
||||||
|
composer)
|
||||||
|
bash "$DOTFILES/scripts/install-composer.sh" \
|
||||||
|
&& msg_done "🎉 composer installed!"
|
||||||
;;
|
;;
|
||||||
starship)
|
starship)
|
||||||
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin \
|
curl -sS https://starship.rs/install.sh | sh -s -- --bin-dir ~/.local/bin \
|
||||||
@@ -52,17 +58,20 @@ function section_install
|
|||||||
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
||||||
&& msg_done "NPM Packages have been installed!"
|
&& msg_done "NPM Packages have been installed!"
|
||||||
;;
|
;;
|
||||||
settler)
|
ntfy)
|
||||||
bash "$DOTFILES/scripts/settler.sh" && msg_done "🎉 Settler has been run!"
|
bash "$DOTFILES/scripts/install-ntfy.sh" \
|
||||||
|
&& msg_done "ntfy installed!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
menu_section "$USAGE_PREFIX" "all | antigen | starship | nvm | npm | macos | settler"
|
menu_section "$USAGE_PREFIX" "all | antigen | composer | starship | macos | nvm | npm"
|
||||||
menu_item "all" "Installs antigen, macos, brew and ext_gh"
|
menu_item "all" "Installs macos defaults, antigen, starship, brew, nvm and npm packages"
|
||||||
menu_item "antigen" "Updates the antigen.zsh file"
|
menu_item "antigen" "Updates the antigen.zsh file"
|
||||||
|
menu_item "composer" "Install composer"
|
||||||
menu_item "starship" "Install starship.rs"
|
menu_item "starship" "Install starship.rs"
|
||||||
menu_item "macos" "Setup nice macOS defaults"
|
menu_item "macos" "Setup nice macOS defaults"
|
||||||
menu_item "nvm" "Install Node Version Manager (nvm)"
|
menu_item "nvm" "Install Node Version Manager (nvm)"
|
||||||
menu_item "npm" "Install NPM Packages"
|
menu_item "npm" "Install NPM Packages"
|
||||||
|
menu_item "ntfy" "Install ntfy"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -126,7 +135,7 @@ function section_dotfiles
|
|||||||
msg_ok "Linked nvim and astronvim"
|
msg_ok "Linked nvim and astronvim"
|
||||||
hash npm 2> /dev/null && $0 install npm
|
hash npm 2> /dev/null && $0 install npm
|
||||||
msg_ok "Installed packages"
|
msg_ok "Installed packages"
|
||||||
msg_done "...and we are done!"
|
msg_done "nvim reset!"
|
||||||
;;
|
;;
|
||||||
yamlfmt)
|
yamlfmt)
|
||||||
# format yaml files
|
# format yaml files
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ while true; do
|
|||||||
kill -0 "$$" || exit
|
kill -0 "$$" || exit
|
||||||
done 2> /dev/null &
|
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 #
|
# General UI/UX #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user