diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-01-08 22:04:32 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-01-08 22:04:32 +0100 |
| commit | d05229ca0d646d699b87d6175f5cbc4c07a756eb (patch) | |
| tree | 6d512561d743812bfc9c9e108b004331cc6156b5 /modules/system | |
| parent | edc3be51cef94c0a0fe8ee6ce122be7f4329325d (diff) | |
keyboard: add warning when enableKeyMapping is not set
Diffstat (limited to 'modules/system')
| -rw-r--r-- | modules/system/keyboard.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/system/keyboard.nix b/modules/system/keyboard.nix index 3b16c3b..b9b77d6 100644 --- a/modules/system/keyboard.nix +++ b/modules/system/keyboard.nix @@ -39,6 +39,9 @@ in config = { + warnings = mkIf (!cfg.enableKeyMapping && cfg.userKeyMapping != []) + [ "system.keyboard.enableKeyMapping is not enabled, keyboard mappings will not be configured." ]; + system.keyboard.userKeyMapping = mkMerge [ (mkIf cfg.remapCapsLockToControl [{ HIDKeyboardModifierMappingSrc = 30064771129; HIDKeyboardModifierMappingDst = 30064771296; }]) (mkIf cfg.remapCapsLockToEscape [{ HIDKeyboardModifierMappingSrc = 30064771129; HIDKeyboardModifierMappingDst = 30064771113; }]) |
