-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexport.sh
executable file
·80 lines (73 loc) · 2.36 KB
/
export.sh
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
#!/usr/bin/env sh
mkdir -p ~/.config/nvim/
rsync -ra ./nvim/ ~/.config/nvim
mkdir -p ~/.config/lvim/
rsync -ra ./lvim/ ~/.config/lvim
mkdir -p ~/.config/sway/
rsync -ra ./sway/ ~/.config/sway
mkdir -p ~/.config/waybar/
rsync -ra ./waybar/ ~/.config/waybar
mkdir -p ~/.config/swaylock/
rsync -ra ./swaylock/ ~/.config/swaylock
mkdir -p ~/.config/gammastep/
rsync -ra ./gammastep/ ~/.config/gammastep
mkdir -p ~/.config/i3/
rsync -ra ./i3/ ~/.config/i3
mkdir -p ~/.config/i3blocks/
rsync -ra ./i3blocks/ ~/.config/i3blocks
mkdir -p ~/.config/redshift
rsync -ra ./redshift/ ~/.config/redshift
mkdir -p ~/.config/swappy
rsync -ra ./swappy/ ~/.config/swappy
mkdir -p ~/.config/picom
cp picom.conf ~/.config/picom/
mkdir -p ~/.config/helix
cp helix.toml ~/.config/helix/config.toml
cp .radare2rc ~
mkdir -p ~/.config/git
cp .gitconfig ~/.config/git/config
cp .Xmodmap ~
cp .xinitrc ~
cp .Xresources ~
cp .dircolors ~
cp .zshrc ~
cp .zprofile ~
cp .bashrc ~
cp .profile ~
cp .tmux.conf ~
cp ./sway-session.target ~/.config/systemd/user/
# resticprofile can be user-readable, only the config.toml must be root:root
if [[ ! -d "/etc/resticprofile/shared" ]]; then
sudo mkdir -p /etc/resticprofile/shared
sudo chown "$USER:$USER" /etc/resticprofile /etc/resticprofile/shared
fi
rsync -ra ./resticprofile_shared/ /etc/resticprofile/shared/
if [[ ! -d "/etc/keyd" || $(stat -c "%U" "/etc/keyd") != "$USER" ]]; then
sudo mkdir -p /etc/keyd/
sudo chown "$USER:$USER" /etc/keyd
fi
cp ./keyd.conf /etc/keyd/default.conf
# some scripts should be made available globally for use with systemd or other
# root processes
rsync -ra ./.my_scripts ~/
for SCRIPT in systemd-notify-failure root-notify-send systemd-gotify-failure gotify-send
do
if [[ ! -f "/usr/local/bin/${SCRIPT}" ]]; then
sudo ln -s "$HOME/.my_scripts/${SCRIPT}" /usr/local/bin
fi
done
# setup secrets directory in case it does not exist
if [[ -d "/data" && ! -d "/data/secrets" ]]; then
echo "created /data/secrets/, make sure to populate secrets as needed"
sudo mkdir -p /data/secrets
fi
mkdir -p ~/.config/terminator
rsync -ra ./terminator/ ~/.config/terminator/
mkdir -p ~/.config/alacritty/
cp alacritty.toml ~/.config/alacritty/alacritty.toml
mkdir -p ~/.config/Code/User/
rsync -ra Code/User/ ~/.config/Code/User/
# echo "installing vscode extensions"
# ./install_extensions.py
# check if secrets are set on this system
./check_secrets.sh