summary refs log tree commit diff
path: root/nixos/modules/config/i18n.nix
diff options
context:
space:
mode:
authorMoritz Ulrich <moritz@tarn-vedra.de>2014-02-17 20:46:33 +0100
committerMoritz Ulrich <moritz@tarn-vedra.de>2014-02-17 20:46:33 +0100
commit958df8b9d12985431f7ec82978d7e8e6f852eb57 (patch)
treefcc62d88addd0dd483195a41e9b65c89b84707f2 /nixos/modules/config/i18n.nix
parent09b23658069eee3f070aec5585938c968dc6e5dc (diff)
downloadnixlib-958df8b9d12985431f7ec82978d7e8e6f852eb57.tar
nixlib-958df8b9d12985431f7ec82978d7e8e6f852eb57.tar.gz
nixlib-958df8b9d12985431f7ec82978d7e8e6f852eb57.tar.bz2
nixlib-958df8b9d12985431f7ec82978d7e8e6f852eb57.tar.lz
nixlib-958df8b9d12985431f7ec82978d7e8e6f852eb57.tar.xz
nixlib-958df8b9d12985431f7ec82978d7e8e6f852eb57.tar.zst
nixlib-958df8b9d12985431f7ec82978d7e8e6f852eb57.zip
i18n.consoleKeyMap: Accept string or path.
i18n.consoleKeyMap maps to KEYMAP=... in vconsole.conf and `loadkeymap'
in stage1. Both of these accept paths to a keymap file in addition to
a string containing the name of the keymap.

With this commit, it's possible to use your own keymap via:

i18n.consoleKeyMap = ./path/to/something.kmap
Diffstat (limited to 'nixos/modules/config/i18n.nix')
-rw-r--r--nixos/modules/config/i18n.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/config/i18n.nix b/nixos/modules/config/i18n.nix
index 56d541cb9b3b..310739aa1707 100644
--- a/nixos/modules/config/i18n.nix
+++ b/nixos/modules/config/i18n.nix
@@ -53,7 +53,11 @@ in
       };
 
       consoleKeyMap = mkOption {
-        type = types.str;
+        type = mkOptionType {
+          name = "string or path";
+          check = t: (isString t || types.path.check t);
+        };
+
         default = "us";
         example = "fr";
         description = ''