28 lines
899 B
Bash
28 lines
899 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# generate fstab
|
||
|
genfstab -U /mnt >> /mnt/etc/fstab
|
||
|
|
||
|
# Set time
|
||
|
arch-chroot /mnt ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
||
|
arch-chroot /mnt hwclock --systohc
|
||
|
|
||
|
# Localize
|
||
|
echo -e 'en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8' > /mnt/etc/locale.gen
|
||
|
arch-chroot /mnt locale-gen
|
||
|
echo 'LANG=de_DE.UTF-8' > /mnt/etc/locale.conf
|
||
|
echo 'KEYMAP=de-latin1' > /mnt/etc/vconsole.conf
|
||
|
|
||
|
# pacman easter egg :)
|
||
|
sed -i 's/\[options\]/\[options\]\nILoveCandy/g' /mnt/etc/pacman.conf
|
||
|
|
||
|
# set user and password, setup sudo
|
||
|
arch-chroot /mnt groupadd sudo
|
||
|
sed -i 's/# \%sudo/\%sudo/g' /mnt/etc/sudoers
|
||
|
arch-chroot /mnt useradd --create-home --password '$1$yChoD0uK$A606S7MGjw5OBvH4ZpIXO/' -G sudo user # user:user
|
||
|
|
||
|
# network
|
||
|
cp /tmp/deliver/00-wired.network /mnt/etc/systemd/network/00-wired.network
|
||
|
chmod 644 /mnt/etc/systemd/network/00-wired.network
|
||
|
arch-chroot /mnt systemctl enable systemd-networkd
|