-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path5_automated_configs
executable file
·74 lines (56 loc) · 2.96 KB
/
5_automated_configs
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
#!/bin/bash
set -e
# my crons
crontab /home/fisa/devel/mios/dotfiles/crontab
# my crons that have to be runned as super user
sudo crontab /home/fisa/devel/mios/dotfiles/crontab_su
# my hosts
cat /home/fisa/devel/mios/dotfiles/hosts | sudo tee -a /etc/hosts
# create user invitado
echo " >>>> INVITADO USER"
sudo adduser invitado
# scripts to allow invitado user to share tmux on read-only mode
sudo cp /home/fisa/devel/mios/scripts/read_only_shared_tmux_attach /home/invitado/conectar
sudo chown invitado:invitado /home/invitado/conectar
# add my ssh key
echo " >>>> SSH KEY"
ssh-add /home/fisa/.ssh/fisa_ssh_3
# add local bin path to fish
fish -c "set -U fish_user_paths /home/fisa/.local/bin $fish_user_paths"
# other versioned configs that aren't ported by the dotfiles porting script because of
# their locations inside .config
ln -s /home/fisa/devel/mios/argos /home/fisa/.config/
mkdir -p /home/fisa/.config/ranger
ln -s /home/fisa/devel/mios/dotfiles/ranger_rc.conf /home/fisa/.config/ranger/rc.conf
mkdir -p /home/fisa/.config/fish/functions
ln -s /home/fisa/devel/mios/dotfiles/config.fish /home/fisa/.config/fish/
ln -s /home/fisa/devel/mios/dotfiles/fish_prompt.fish /home/fisa/.config/fish/functions/
ln -s /home/fisa/devel/mios/dotfiles/fish_right_prompt.fish /home/fisa/.config/fish/functions/
mkdir -p /home/fisa/.config/nvim
ln -s /home/fisa/devel/fisa-vim-config/config.vim /home/fisa/.config/nvim/init.vim
# enable tap-to-click
gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
# add ability to unmount cyrene/tero sshfs without sudo password
echo "fisa ALL=NOPASSWD: /bin/umount /home/fisa/servers/tero_cyrene/" | sudo tee /etc/sudoers.d/fisa_umount_cyrene_tero
sudo chmod 0440 /etc/sudoers.d/fisa_umount_cyrene_tero
# add ability to join shared tmux without sudo password for invitado
echo "invitado ALL=NOPASSWD: /usr/bin/tmux -2 -S /tmp/shared_tmux attach -r" | sudo tee /etc/sudoers.d/invitado_shared_tmux
sudo chmod 0440 /etc/sudoers.d/invitado_shared_tmux
# replace fish history file with symlink to custom fish history file
mkdir -p /home/fisa/.local/share/fish
rm -f /home/fisa/.local/share/fish/fish_history
ln -s /home/fisa/.fish_history /home/fisa/.local/share/fish/fish_history
# add fisa user to the dialout group, so I can run scripts using serial ports (like the microbit) without sudo
sudo usermod -a -G dialout fisa
# add symlink for ctop binary
sudo ln -s /home/fisa/apps/ctop /usr/local/bin/ctop
# install argos extension for gnome (the one in the official website is broken)
mkdir -p /home/fisa/.local/share/gnome-shell/extensions
ln -s /home/fisa/apps/argos/[email protected]/ /home/fisa/.local/share/gnome-shell/extensions/
# enable tlp for better battery and heating management
sudo tlp start
# import the gpg key
echo " >>>> GPG KEY"
gpg --import /home/fisa/keys/fisa_gpg_3.priv.asc
# connect firefox icon theme with the vimix icon theme, so it uses the cursor theme I like
sudo snap connect firefox:icon-themes vimix-themes:icon-themes