-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_once_install-packages.sh.tmpl
61 lines (53 loc) · 1.32 KB
/
run_once_install-packages.sh.tmpl
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
#!/bin/bash
### hard link ###
{{ if eq .chezmoi.os "darwin" -}}
# navi #
[ -e "~/.config/private/navi/mycheat_private.cheat.md" ] && ln -f ~/.config/private/navi/mycheat_private.cheat.md ~/.config/navi/cheats
ln -f ~/.private/.zprofile.secret ~
ln -f ~/.private/navi/mycheat_private.cheat ~/.navi/cheats
ln -f vscode/snippet/global.code-snippets ~/.vscode/
read -r -d '' PACKAGES <<EOF
colordiff
font-hackgen
font-hackgen-nerd
gpg
pinentry-mac
t-rec
yqrashawn/goku/goku
coreutils
findutils
gnu-sed
grep
EOF
for package in $(echo $PACKAGES); do
brew install $package
done
read -r -d '' CASKPACKAGES <<EOF
alacritty
arc
karabiner-elements
keyboardcleantool
raycast
visual-studio-code
EOF
for package in $(echo $CASKPACKAGES); do
brew install --cask $package
done
{{ else -}}
read -r -d '' PACKAGES <<EOF
git
gpg
zsh
EOF
for package in $(echo $PACKAGES); do
apt install -y $package
done
{{- end }}
# Nix
{{ if eq .chezmoi.os "darwin" -}}
# nix-installerでインストール
# https://github.com/DeterminateSystems/nix-installer
[ ! -e "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh" ] && curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
{{ else -}}
[ ! -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ] && curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
{{- end }}