base-image/scripts/timezone_and_locale.sh
2022-12-15 20:45:20 -06:00

18 lines
481 B
Bash

#!/usr/bin/env bash
set -eux
readonly KEYBOARD="us"
readonly ENCODING="UTF-8"
readonly TIMEZONE="US/Central"
readonly LANGUAGE="en_US.${ENCODING}"
export KEYBOARD ENCODING TIMEZONE LANGUAGE
arch-chroot /mnt ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
arch-chroot /mnt sed -i "s/#${LANGUAGE}/${LANGUAGE}/" /etc/locale.gen
arch-chroot /mnt locale-gen
arch-chroot /mnt echo "${LANGUAGE}" > /etc/locale.conf
arch-chroot /mnt echo "KEYMAP=${KEYBOARD}" > /etc/vconsole.conf