Set the x11 keymap during system setup
This commit is contained in:
parent
23ec9a15c1
commit
b51d065170
2 changed files with 15 additions and 0 deletions
9
scripts/Arch/OS/set-keymap.service
Normal file
9
scripts/Arch/OS/set-keymap.service
Normal file
|
@ -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
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue