#!/bin/bash

set -ex

HOSTNAME="sori"
DOMAIN="eon.lan"

ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
echo "$HOSTNAME" > /etc/hostname

sed -i 's/^#en_US.UTF-8/en_US.UTF-8/' /etc/locale.gen
locale-gen

cat > /etc/hosts << EOF
127.0.0.1	localhost
::1      	localhost
127.0.1.1	${HOSTNAME}.${DOMAIN} ${HOSTNAME}
EOF

mkinitcpio -P

passwd

bootctl install
