Allow setting the key map
This commit is contained in:
parent
8692c51a7f
commit
9962e8e147
3 changed files with 14 additions and 3 deletions
|
@ -17,6 +17,12 @@
|
||||||
description = "The time zone of the system.";
|
description = "The time zone of the system.";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
keyMap = mkOption {
|
||||||
|
type = types.nullOr types.str;
|
||||||
|
description = "The console key map of the system.";
|
||||||
|
default = null;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
timeZone = "Europe/Zurich";
|
timeZone = "Europe/Zurich";
|
||||||
|
keyMap = "de_CH-latin1";
|
||||||
|
|
||||||
i18n = {
|
i18n = {
|
||||||
localeSettings =
|
localeSettings =
|
||||||
|
|
|
@ -5,7 +5,6 @@ begin
|
||||||
source "$dir/../../Common/Scripts/hooks.fish"
|
source "$dir/../../Common/Scripts/hooks.fish"
|
||||||
|
|
||||||
set -q CONFIG_MODULE || set -l CONFIG_MODULE "$dir/config.nix"
|
set -q CONFIG_MODULE || set -l CONFIG_MODULE "$dir/config.nix"
|
||||||
set -q ARCH_KEYMAP || set -l ARCH_KEYMAP de_CH-latin1
|
|
||||||
set -q ARCH_X11_KEYMAP || set -l ARCH_X11_KEYMAP ch
|
set -q ARCH_X11_KEYMAP || set -l ARCH_X11_KEYMAP ch
|
||||||
|
|
||||||
set -l mountDir (getConfig valhalla.partition.rootDir)
|
set -l mountDir (getConfig valhalla.partition.rootDir)
|
||||||
|
@ -20,7 +19,9 @@ begin
|
||||||
set -l tempRoot "/opt/$(basename "$projectName")"
|
set -l tempRoot "/opt/$(basename "$projectName")"
|
||||||
set -l tempDir "$tempRoot/$relativeDir"
|
set -l tempDir "$tempRoot/$relativeDir"
|
||||||
|
|
||||||
loadkeys "$ARCH_KEYMAP"
|
if set -l keyMap (getConfig valhalla.keyMap)
|
||||||
|
loadkeys "$keyMap"
|
||||||
|
end
|
||||||
|
|
||||||
and if set -l timezone (getConfig valhalla.timeZone)
|
and if set -l timezone (getConfig valhalla.timeZone)
|
||||||
timedatectl set-timezone "$timezone"
|
timedatectl set-timezone "$timezone"
|
||||||
|
@ -66,7 +67,10 @@ begin
|
||||||
jq --raw-output '[keys[] as $key | "\($key)=\(.[$key])"] | join("\n")'
|
jq --raw-output '[keys[] as $key | "\($key)=\(.[$key])"] | join("\n")'
|
||||||
end | arch-chroot "$mountDir" tee /etc/locale.conf > /dev/null
|
end | arch-chroot "$mountDir" tee /etc/locale.conf > /dev/null
|
||||||
|
|
||||||
and echo "KEYMAP=$ARCH_KEYMAP" | arch-chroot "$mountDir" tee /etc/vconsole.conf > /dev/null
|
and if set -q keyMap
|
||||||
|
echo "KEYMAP=$keyMap" | arch-chroot "$mountDir" tee /etc/vconsole.conf > /dev/null
|
||||||
|
end
|
||||||
|
|
||||||
and echo "$ARCH_HOSTNAME" | arch-chroot "$mountDir" tee /etc/hostname > /dev/null
|
and echo "$ARCH_HOSTNAME" | arch-chroot "$mountDir" tee /etc/hostname > /dev/null
|
||||||
|
|
||||||
and arch-chroot "$mountDir" mkinitcpio -P
|
and arch-chroot "$mountDir" mkinitcpio -P
|
||||||
|
|
Loading…
Reference in a new issue