From 70e213cd1e9c49b9d45bffc6791b667ac2ba4b15 Mon Sep 17 00:00:00 2001 From: Ein Verne Date: Mon, 13 Feb 2023 11:59:55 +0900 Subject: [PATCH] feat: update dotbot config fot bootstrap --- config/bootstrap.conf.yml | 67 ++++++++++++++++++++++----------------- config/install.conf.yml | 4 +-- config/macos.conf.yml | 11 ++++++- 3 files changed, 50 insertions(+), 32 deletions(-) diff --git a/config/bootstrap.conf.yml b/config/bootstrap.conf.yml index 8a51048..5ee7d64 100644 --- a/config/bootstrap.conf.yml +++ b/config/bootstrap.conf.yml @@ -1,44 +1,53 @@ # bootstrap linux, macos # Setup zinit - create: - - ~/.zinit - - ~/.tmux + - ~/.zinit + - ~/.tmux - shell: - - description: Clone zinit - quiet: true - command: | - if cd ~/.zinit/bin; - then git pull; - else git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin; fi + - description: Clone zinit + quiet: true + command: | + if cd ~/.zinit/bin; + then git pull; + else git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin; fi # Setup tmux plugin manager - shell: - - description: Clone TPM - quiet: true - command: | - if cd ~/.tmux/plugins/tpm; - then git pull; - else git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm; fi + - description: Clone TPM + quiet: true + command: | + if cd ~/.tmux/plugins/tpm; + then git pull; + else git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm; fi -# Change default shell to zsh - shell: - - description: Change default shell to zsh - quiet: true - command: | - update_shell() { - local shell_path; - shell_path="$(command -v zsh)" - - fancy_echo "Changing your shell to zsh ..." - if ! grep "$shell_path" /etc/shells > /dev/null 2>&1 ; then - fancy_echo "Adding '$shell_path' to /etc/shells" - sudo sh -c "echo $shell_path >> /etc/shells" + - description: Install pyenv + quiet: true + command: | + if ! command -v pyenv &> /dev/null + then + curl https://pyenv.run | bash fi - sudo chsh -s "$shell_path" "$USER" - } - update_shell +# Change default shell to zsh +- shell: + - description: Change default shell to zsh + quiet: true + command: | + update_shell() { + local shell_path; + shell_path="$(command -v zsh)" + + fancy_echo "Changing your shell to zsh ..." + if ! grep "$shell_path" /etc/shells > /dev/null 2>&1 ; then + fancy_echo "Adding '$shell_path' to /etc/shells" + sudo sh -c "echo $shell_path >> /etc/shells" + fi + sudo chsh -s "$shell_path" "$USER" + } + + update_shell - link: ~/.config/espanso: diff --git a/config/install.conf.yml b/config/install.conf.yml index dba451e..24388c6 100644 --- a/config/install.conf.yml +++ b/config/install.conf.yml @@ -3,10 +3,10 @@ relink: true force: true -- clean: ['~'] +- clean: [ '~' ] - link: - ~/.dotfiles: + ~/.dotfiles: force: true path: '' diff --git a/config/macos.conf.yml b/config/macos.conf.yml index edc07ea..f964c1f 100644 --- a/config/macos.conf.yml +++ b/config/macos.conf.yml @@ -1,4 +1,13 @@ # bootstrap: macos +- shell: + - description: Install Homebrew + quiet: true + command: | + if ! command -v brew &> /dev/null + then + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + fi + - create: - ~/.config/kitty @@ -51,4 +60,4 @@ - hammerspoon - obsidian - bigwig-club/brew/upic - - visual-studio-code \ No newline at end of file + - visual-studio-code