diff --git a/scripts/Arch/OS/set-keymap.service b/scripts/Arch/OS/set-keymap.service new file mode 100644 index 00000000..6bf3b9b7 --- /dev/null +++ b/scripts/Arch/OS/set-keymap.service @@ -0,0 +1,9 @@ +[Unit] +Description=Set X11 Keymap + +[Service] +PassEnvironment=ARCH_X11_KEYMAP +ExecStart=bash -c 'localectl set-x11-keymap "$ARCH_X11_KEYMAP"; poweroff' + +[Install] +WantedBy=multi-user.target diff --git a/scripts/Arch/OS/setup.sh b/scripts/Arch/OS/setup.sh index c4d39c12..b1218689 100755 --- a/scripts/Arch/OS/setup.sh +++ b/scripts/Arch/OS/setup.sh @@ -59,6 +59,12 @@ USER_DISPLAYNAME="${USER_DISPLAYNAME}" \ USER_GROUPS="${USER_GROUPS}" \ arch-chroot "$ARCH_MOUNT_ROOT" bash "$tempDir/user.sh"; +cp ./set-keymap.service "$ARCH_MOUNT_ROOT/etc/systemd/system"; +systemd-nspawn -D "$ARCH_MOUNT_ROOT" systemctl enable set-keymap; +systemd-nspawn -bD "$ARCH_MOUNT_ROOT" -E "ARCH_X11_KEYMAP=${ARCH_X11_KEYMAP}"; +systemd-nspawn -D "$ARCH_MOUNT_ROOT" systemctl disable set-keymap; +rm "$ARCH_MOUNT_ROOT/etc/systemd/system/set-keymap.service"; + arch-chroot "$ARCH_MOUNT_ROOT" rm -rf "$tempRoot"; popd > /dev/null;