add setting of locales to packages

This commit is contained in:
Maximilian Keßler 2022-07-25 12:25:04 +02:00
parent 0b798fef93
commit 1b5dcb15bd
3 changed files with 35 additions and 1 deletions

View file

@ -1,5 +1,5 @@
pkgbase=mkessler
pkgname=(mkessler-base mkessler-xmonad mkessler-x mkessler-audio mkessler-software mkessler-print mkessler-desktop mkessler-devel)
pkgname=(mkessler-base mkessler-xmonad mkessler-x mkessler-audio mkessler-software mkessler-print mkessler-locale mkessler-desktop mkessler-devel)
pkgver=0.1
pkgrel=1
pkgdesc="Base system configuration for mkessler systems"
@ -43,6 +43,9 @@ package_mkessler-x() {
# launching utilities, status bar
depends+=(dmenu rofi polybar)
# sets X11 keyboard layout
install=mkessler-x.install
}
package_mkessler-audio() {
@ -72,6 +75,11 @@ package_mkessler-print() {
depends=(cups cups-pdf)
}
package_mkessler-locale() {
depends=()
install=mkessler-locale.install
}
package_mkessler-desktop() {
depends=(mkessler-base mkessler-x mkessler-audio mkessler-software)
}

13
mkessler-locale.install Normal file
View file

@ -0,0 +1,13 @@
post_install() {
# set timezone
ln -sf /usr/share/zoneinfo/Europe/Brussels "/etc/localtime"
# set and generate locales, english as primary, german as secondary
echo "LANG=en_US.UTF-8" > /etc/locale.conf
sed 's/#en_US/en_US/' -i /etc/locale.gen
sed 's/#de_DE/de_DE/' -i /etc/locale.gen
locale-gen
# set keymap
echo 'KEYMAP=neo' > /etc/vconsole.conf
}

13
mkessler-x.install Normal file
View file

@ -0,0 +1,13 @@
post_install() {
cat <<EOF > /etc/X11/xorg.conf.d/00-keyboard.conf
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "de"
Option "XkbVariant" "neo"
EndSection
EOF
}