aboutsummaryrefslogtreecommitdiff
path: root/src/chroot-install.sh
blob: 414bcbcf335fe48b21548a614654b8faa9a6ebbd (plain)
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
#/bin/sh

echo "::============================================================================::"
echo "Editing locale file"
echo "::============================================================================::"

sed -i -e 's/#en_US.UTF-8/en_US.UTF-8/g' /etc/locale.gen
sed -i -e 's/#fr_FR.UTF-8/fr_FR.UTF-8/g' /etc/locale.gen

echo "::============================================================================::"
echo "Generating locales"
echo "::============================================================================::"

locale-gen

echo "::============================================================================::"
echo "Set correct lang & keymap"
echo "::============================================================================::"

echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8
echo KEYMAP=fr > /etc/vconsole.conf

echo "::============================================================================::"
echo "Set time zone & hardware clock"
echo "::============================================================================::"

ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
hwclock --systohc --utc

echo "::============================================================================::"
echo "Set hostname"
echo "::============================================================================::"

echo march > /etc/hostname
sed -i -e 's/localhost$/march/g' /etc/hosts

echo "::============================================================================::"
echo "Configuration of the network"
echo "::============================================================================::"

systemctl enable dhcpcd.service

echo "::============================================================================::"
echo "Installation of grub"
echo "::============================================================================::"

pacman --noconfirm -S grub os-prober
grub-install --target=i386-pc --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg

pacman --noconfirm -S iw wpa_supplicant dialog python python-appdirs python-packaging python-pyparsing python-setuptools python-dbus dbus slim  git vim tmux qterminal openssh stow xorg xorg-xinit i3

echo "::============================================================================::"
echo "Disable fucking BEEEEP"
echo "::============================================================================::"

echo "blacklist pcspkr" > /etc/modprobe.d/nobeep.conf

echo "::============================================================================::"
echo "Set correct xinit configuration"
echo "::============================================================================::"

echo "i3" > /home/neodarz/.xinitrc

echo "::============================================================================::"
echo "Configuration of sudoers"
echo "::============================================================================::"

sed -i -e 's/root ALL=(ALL) ALL/root ALL=(ALL) ALL\nneodarz ALL=(ALL) NOPASSWD:ALL/g' /etc/sudoers

echo "::============================================================================::"
echo "Configuration of slim"
echo "::============================================================================::"

sed -i -e "s/#default_user        simone/default_user neodarz/g" /etc/slim.conf
sed -i -e "s/#focus_password      no/focus_password yes/g" /etc/slim.conf
sed -i -e "s/# numlock             on/numlock on/g" /etc/slim.conf
xorgConf=/etc/X11/xorg.conf.d/10-evdev.conf
echo 'Section "InputClass"' > $xorgConf
echo '         Identifier "evdev keyboard catchall"' >> $xorgConf
echo '         MatchIsKeyboard "on"' >> $xorgConf
echo '         MatchDevicePath "/dev/input/event*"' >> $xorgConf
echo '         Driver "evdev"' >> $xorgConf
echo '         # Keyboard layouts' >> $xorgConf
echo '         Option "XkbLayout" "fr"' >> $xorgConf
echo 'EndSection' >> $xorgConf

systemctl enable slim.service

echo "::============================================================================::"
echo "Compiling i3pystatys"
echo "::============================================================================::"

cd /tmp
sudo -u neodarz git clone https://aur.archlinux.org/i3pystatus.git
cd i3pystatus
sudo -u neodarz makepkg --noconfirm -si
cd ..
sudo -u neodarz git clone https://aur.archlinux.org/ttf-font-awesome.git
cd ttf-font-awesome
sudo -u neodarz makepkg --noconfirm -si
cd ..
sudo -u neodarz git clone https://aur.archlinux.org/otf-fira-code.git
cd otf-fira-code
sudo -u makepkg --noconfirm -si
cd /home/neodarz

echo "::============================================================================::"
echo "Installing some python modules"
echo "::============================================================================::"

sudo easy_install netifaces colour dbus

echo "::============================================================================::"
echo "Installation my beautiful ascii theme"
echo "::============================================================================::"

sudo -u neodarz git clone https://git.neodarz.net/neodarz/scripts_shit/dotfiles_ascii.git
cd dotfiles_ascii
sudo -u neodarz git checkout t410
sudo -u neodarz stow i3
sudo -u neodarz stow i3pystatus
sudo -u neodarz stow qterminal.org

sed -i -e 's/neodarz ALL=(ALL) NOPASSWD:ALL/neodarz ALL=(ALL) ALL/g' /etc/sudoers

rm /chroot-install.sh