-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall.conf.yaml
143 lines (129 loc) · 5.15 KB
/
install.conf.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
- defaults:
link:
relink: true
force: true # For GitHub Codespaces to overwrite autocreated by them: .bashrc, .config
create:
mode: 0700
shell:
stderr: true
stdout: true
- clean: ["~"]
# Remove existing files in GitHub CodeSpaces. Using force relink is not enough as I dont' have .zshrc in my repo, but the one from Codespaces prevents zsh to look for my XDG zsh config.
- if:
cond: test "$CODESPACES" = true
met:
- shell:
# - sudo apt-get update && sudo apt-get install -y fzf fd-find
# NOPE apt-get version is too old, use go instead. Apt-get verison (0.44) is given but $(fzf --zsh) was added in 0.48. Ref: https://github.com/junegunn/fzf/issues/2599#issuecomment-2120141816
# TODO switch to use apt-get when the included version supports $(fzf --zsh).
- sudo apt-get update && sudo apt-get install -y fd-find
- go install github.com/junegunn/fzf@latest
# ~/.zshenv is not read when terminal.integrated.shellIntegration.enabled. Thus symlink .zshrc ourselves instead. Ref: https://stackoverflow.com/a/75848433
# This needs to be just before linking my own ~/.config, Codespaces will create its own periodically.......
# NOPE just add $ZDOTDIR to vscode settings.json instead.
# - cat .zshenv .config/zsh/.zshrc >> $HOME/.zshrc
# NOPE not needing to remove .zshrc etc anymore since ZDOTDIR is set now. These files donesn't seem to be there anymore anways.:O
# - cd $HOME; rm -rf .bashrc .config .zprofile .zshrc
# Delete ~/.config so we can link in our own. Needs to be done close our linking as the dir is regularily recreated.
# - rm -rf $HOME/.config
- link:
~/.bashrc: .bashrc
~/.config: .config
~/.hushlogin: .hushlogin
~/.local/repos:
path: .local/repos
create: true
~/.zshenv: .zshenv
~/bin: bin
- create:
- ~/dl
- ~/pub
- ~/src
- ~/tmp
- ~/.local/share/tig # Make tig use $XDG_DATA_HOME. Reference: https://wiki.archlinux.org/title/XDG_Base_Directory#Partial
# TODO use ifmacos when bug fixed. https://github.com/ssbanerje/dotbot-ifplatform/pull/4#issuecomment-1532112176
#- ifmacos:
# - brewfile:
# - .config/homebrew/Brewfile
- if:
cond: test $(uname) = Darwin
met:
- brewfile:
- .config/homebrew/Brewfile
- if:
cond: "test -e ~/.config/homebrew/Brewfile.$(hostname)"
met:
- brewfile:
- "~/.config/homebrew/Brewfile.$(hostname)"
# TODO use ifmacos when bug fixed. https://github.com/ssbanerje/dotbot-ifplatform/pull/4#issuecomment-1532112176
- if:
cond: test $(uname) = Darwin
met:
- shell:
- command: ~/bin/macos_config.sh
description: Running macos_config.sh
stdin: true
- command: ~/bin/macos_install.sh
description: Running macos_config.sh
- command: ln -s ~/Downloads ~/dl
- command: ln -s ~/Documents ~/doc
- command: ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/ ~/icloud
description: Symlink icloud to ~/
# Don't double-symlink via ~/icloud, because Stacks in Dock.app won't follow double-symlinks.
- command: ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/bak ~/bak
- command: ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/media ~/media
- command: ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs/work ~/work
# TODO conditionally execute: ~/bin/windows_install.ps1
# and migrate to use https://github.com/JamJar00/dotbot-scoop
# ifplatform has no ifwindows
# But could do something like
#- if:
# cond: 'echo "$OSTYPE | grep -q "msys*"'
# TODO Linux: set up one of the apt-get plugins https://github.com/anishathalye/dotbot/wiki/Plugins possibly with the sudo plugin.
# and base it of ~/doc/tech/irvine/arch_packages.txt
# Guard against CodeSpaces as it will slow down set process for a new container significantly, and the languages will already be installed in the universal devcontainer anyways.
- if:
cond: test "$CODESPACES" != true
met:
- asdf:
- plugin: ruby
versions:
- latest
global: latest
- plugin: python
versions:
- latest
global: latest
- plugin: golang
versions:
- latest
global: latest
- plugin: nodejs
versions:
- latest
global: latest
#- plugin: java
# versions:
# - latest
# global: latest
- if:
cond: test "$CODESPACES" != true
met:
- crontab:
- cron: "@monthly"
command: if_fail_do_notification crontab_backup.sh
- cron: 0 13 * * *
command: if_fail_do_notification dotfiles_backup_local.sh
- firefox:
user.js: .config/firefox/user.js
# Oly for desktop machines, not CodeSpaces.
- if:
cond: test "$CODESPACES" != true
met:
- ghq:
- repo: erikw/templates
flags: [-p]
- repo: erikw/erikw
flags: [-p]
- repo: erikw/erikw.me-jekyll
flags: [-p]