-
Notifications
You must be signed in to change notification settings - Fork 0
/
setupDots
executable file
·68 lines (53 loc) · 1.62 KB
/
setupDots
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
#!/usr/bin/env bash
# PLEASE SOURCE THIS SCRIPT
set -xeuo pipefail
user_config() {
ln -sf "$PWD"/.local/bin/ ~/.local/
ln -sf "$PWD"/.gitconfig ~/
for f in "$PWD"/.config/*; do
ln -sf "$f" ~/.config/
done
for f in "$PWD"/.ssh/*; do
ln -s "$f" ~/.ssh/
done
for f in "$PWD"/shell/.[!.]*; do
ln -sf "$f" ~
done
}
system_config() {
# Keymap
sudo ln -sf "$PWD"/keymaps/colemak /usr/share/X11/xkb/symbols/colemak
sudo ln -sf "$PWD"/keymaps/keyd.conf /etc/keyd/default.conf
sudo mkdir -p -m 755 \
/etc/systemd/sleep.conf.d/ \
/etc/systemd/logind.conf.d/ \
/etc/systemd/resolved.conf.d/
# Configure sleeping stuff (check this stuff with systemd-analyze cat-config)
sudo ln -sf "$PWD"/misc/99-sleep.conf /etc/systemd/sleep.conf.d/
sudo ln -sf "$PWD"/misc/99-logind.conf /etc/systemd/logind.conf.d/
sudo ln -sf "$PWD"/misc/99-sudoers /etc/sudoers.d/ # sudo
sudo chown 0 /etc/sudoers.d/
}
arch_config() {
[ ! -x "$(command -v pacman)" ] && return
# Pacman setup
sudo sed -i '/Color/s/^#//g' /etc/pacman.conf
# sudo sed -i '/VerbosePkgLists/s/^#//g' /etc/pacman.conf
sudo ln -sf "$PWD"/hooks /etc/pacman.d/
# Since dash is faster than bash
sudo ln -sfT dash /usr/bin/sh
}
# Cache keys
ssh_agent() {
mkdir ~/.ssh/
echo "AddKeysToAgent yes" >>~/.ssh/config
ln -sf "$(pwd)"/misc/.pam_environment ~/
systemctl --user enable ssh-agent
systemctl --user start ssh-agent
}
# Get rid of the stupid KDE wallet thing
kde() {
kwriteconfig5 --file kwalletrc --group 'Wallet' --key 'Enabled' 'false'
kwriteconfig5 --file kwalletrc --group 'Wallet' --key 'First Use' 'false'
}
user_config