~alexdavid/dotfiles

ref: 92c8a63d1acf9ee2402364df26e44ad9233db89b dotfiles/archlinux/setup/chroot -rw-r--r-- 1.1 KiB
92c8a63d — Alex David Switch from netctl to networkmanager 5 months ago
                                                                                
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
#!/usr/bin/env bash

set -e

function section {
  echo
  echo
  echo
  echo "################################################################"
  echo "==> $1"
  echo
}

function ask {
  printf "%s: " "$2"
  read $1
}

section "INSTALLING PACKAGES NEEDED AFTER REBOOT"
pacman -S \
  fakeroot binutils \
  intel-ucode \
  networkmanager \
  sudo \
  vi \
  ;

section "ADDING ENCRYPT TO MKINITCPIO"
vi /etc/mkinitcpio.conf
mkinitcpio -p linux

section "SETTING LOCALE"
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
export LANG=en_US.UTF-8
ln -f -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
ask HOSTNAME "Hostname"
echo "$HOSTNAME" > /etc/hostname

section "SETTING ROOT PASSWORD"
passwd

section "CREATING MAIN USER"
ask USERNAME "Username"
useradd -m -g users -G wheel "$USERNAME"
passwd "$USERNAME"

section "SETTING UP SIMPLE FIREWALL"
cp /etc/iptables/simple_firewall.rules /etc/iptables/iptables.rules
systemctl enable iptables.service

section "ENABLE SERVICES"
systemctl enable NetworkManager
systemctl enable systemd-timesyncd