this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

move to a simple bash script setup

+68 -128
+3
misc/global-tool-versions
··· 1 + nodejs 24.6.0 2 + golang 1.25.0 3 + rust 1.89.0
-10
playbooks/main.yml
··· 1 - --- 2 - - hosts: all 3 - vars: 4 - home_dir: /Users/sethetter 5 - dotfiles_dir: "{{ home_dir }}/dotfiles" 6 - roles: 7 - - role: "./roles/zsh" 8 - - role: "./roles/git" 9 - - role: "./roles/vscode" 10 - - role: "./roles/misc"
-13
playbooks/roles/git/tasks/main.yml
··· 1 - - name: link-gitconfig 2 - ansible.builtin.file: 3 - src: "{{ dotfiles_dir }}/git/gitconfig" 4 - dest: "{{ home_dir }}/.gitconfig" 5 - state: link 6 - 7 - # TODO: optionally link work gitconfig based on host name, or something else? 8 - 9 - - name: link-gitignore 10 - ansible.builtin.file: 11 - src: "{{ dotfiles_dir }}/git/gitignore" 12 - dest: "{{ home_dir }}/.gitignore" 13 - state: link
-72
playbooks/roles/misc/tasks/main.yml
··· 1 - # TODO: rectangle?! 2 - - name: link-tmux-config 3 - ansible.builtin.file: 4 - src: "{{ dotfiles_dir }}/misc/tmux.conf" 5 - dest: "{{ home_dir }}/.tmux.conf" 6 - state: link 7 - force: true 8 - 9 - - name: link-vimrc 10 - ansible.builtin.file: 11 - src: "{{ dotfiles_dir }}/misc/vimrc" 12 - dest: "{{ home_dir }}/.vimrc" 13 - state: link 14 - 15 - - name: link-lazygit-config 16 - ansible.builtin.file: 17 - src: "{{ dotfiles_dir }}/misc/lazygit.yml" 18 - dest: "{{ home_dir }}/Library/Application Support/lazygit/config.yml" 19 - state: link 20 - force: true 21 - 22 - - name: link-lazydocker-config 23 - ansible.builtin.file: 24 - src: "{{ dotfiles_dir }}/misc/lazydocker.yml" 25 - dest: "{{ home_dir }}/Library/Application Support/lazydocker/config.yml" 26 - state: link 27 - force: true 28 - 29 - - name: install-scripts 30 - ansible.builtin.file: 31 - src: "{{ item }}" 32 - dest: "{{ home_dir }}/.local/bin/{{ item | basename | regex_replace('.sh$', '') }}" 33 - state: link 34 - force: true 35 - loop: "{{ query('ansible.builtin.fileglob', dotfiles_dir + '/scripts/*.sh', wantlist=True) }}" 36 - 37 - - name: create-k9s-config-directory 38 - file: 39 - path: "{{ home_dir }}/Library/Application Support/k9s/skins" 40 - state: directory 41 - 42 - - name: download-k9s-skin 43 - ansible.builtin.get_url: 44 - url: https://raw.githubusercontent.com/derailed/k9s/master/skins/rose-pine.yaml 45 - dest: "{{ home_dir }}/Library/Application Support/k9s/skins/" 46 - force: true 47 - 48 - - name: link-k9s-config 49 - ansible.builtin.file: 50 - src: "{{ dotfiles_dir }}/misc/k9s.yaml" 51 - dest: "{{ home_dir }}/Library/Application Support/k9s/config.yaml" 52 - state: link 53 - force: true 54 - 55 - - name: create-docker-plugins-dir 56 - ansible.builtin.file: 57 - path: "{{ home_dir }}/.docker/cli-plugins" 58 - state: directory 59 - 60 - - name: link-docker-compose-plugin 61 - ansible.builtin.file: 62 - src: "/opt/homebrew/bin/docker-compose" 63 - dest: "{{ home_dir }}/.docker/cli-plugins/docker-compose" 64 - state: link 65 - force: true 66 - 67 - - name: link-docker-buildx-plugin 68 - ansible.builtin.file: 69 - src: "/opt/homebrew/bin/docker-buildx" 70 - dest: "{{ home_dir }}/.docker/cli-plugins/docker-buildx" 71 - state: link 72 - force: true
-11
playbooks/roles/vscode/tasks/main.yml
··· 1 - - name: get-vscode-configs 2 - ansible.builtin.shell: "ls {{ dotfiles_dir }}/vscode/" 3 - register: vscode_configs 4 - 5 - - name: link-vscode-configs 6 - ansible.builtin.file: 7 - src: "{{ dotfiles_dir }}/vscode/{{ item }}" 8 - dest: "{{ home_dir }}/Library/Application Support/Code/User/{{ item }}" 9 - state: link 10 - force: true 11 - with_items: "{{ vscode_configs.stdout_lines }}"
-22
playbooks/roles/zsh/tasks/main.yml
··· 1 - - name: link-zshrc 2 - ansible.builtin.file: 3 - src: "{{ dotfiles_dir }}/zsh/zshrc" 4 - dest: "{{ home_dir }}/.zshrc" 5 - state: link 6 - force: true 7 - 8 - - name: link-zshenv 9 - ansible.builtin.file: 10 - src: "{{ dotfiles_dir }}/zsh/zshenv" 11 - dest: "{{ home_dir }}/.zshenv" 12 - state: link 13 - force: true 14 - 15 - - name: check-oh-my-zsh 16 - ansible.builtin.shell: "ls {{ home_dir }}/.oh-my-zsh" 17 - ignore_errors: true 18 - register: ohmyzsh_check 19 - 20 - - name: install-oh-my-zsh 21 - ansible.builtin.shell: sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" 22 - when: ohmyzsh_check.stdout.find('oh-my-zsh.sh') == -1
+65
setup.sh
··· 1 + #!/usr/bin/env bash 2 + 3 + set -euo pipefail 4 + 5 + function link_configs { 6 + declare -A mappings 7 + 8 + # TODO: Make this linux compatible 9 + mappings["ghostty"]="$HOME/Library/Application Support/com.mitchellh.ghostty" 10 + mappings["zsh/zshenv"]="$HOME/.zshenv" 11 + mappings["zsh/zshrc"]="$HOME/.zshrc" 12 + mappings["misc/tmux.conf"]="$HOME/.tmux.conf" 13 + mappings["git/gitconfig"]="$HOME/.gitconfig" 14 + mappings["git/gitignore"]="$HOME/.gitignore" 15 + mappings["misc/vimrc"]="$HOME/.vimrc" 16 + mappings["nvim"]="$HOME/.config/nvim" 17 + mappings["misc/global-tool-versions"]="$HOME/.tool-versions" 18 + 19 + for key in "${!mappings[@]}"; do 20 + source="$PWD/${key}" 21 + destination="${mappings[$key]}" 22 + 23 + if [ -d "$source" ]; then 24 + mkdir -p "$(dirname "$destination")" 25 + create_symlink "$source" "$destination" 26 + elif [ -f "$source" ]; then 27 + create_symlink "$source" "$destination" 28 + else 29 + echo "Warning: Source $source does not exist, skipping." 30 + fi 31 + done 32 + } 33 + 34 + function create_symlink { 35 + local source="$1" 36 + local destination="$2" 37 + 38 + if [ -L "$destination" ]; then 39 + if [ "$(readlink "$destination")" = "$source" ]; then 40 + echo "Symlink $destination already points to $source, skipping." 41 + return 42 + else 43 + echo "Removing existing symlink $destination that points to $(readlink "$destination")." 44 + rm "$destination" 45 + fi 46 + fi 47 + 48 + if [ -e "$destination" ]; then 49 + echo "Destination $destination already exists and is not a symlink. Backing it up." 50 + mv "$destination" "${destination}.bak" 51 + fi 52 + 53 + echo "Creating symlink from $source to $destination." 54 + ln -s "$source" "$destination" 55 + } 56 + 57 + function install_oh_my_zsh { 58 + if [ ! -d "$HOME/.oh-my-zsh" ]; then 59 + echo "Installing oh my zsh..." 60 + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended 61 + fi 62 + } 63 + 64 + link_configs 65 + install_oh_my_zsh