summaryrefslogtreecommitdiff
path: root/nixos/modules/hardware/keyboard.nix
blob: dc68b2fd9372ba4aa49974cd04b67320e6821511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config, lib, pkgs, ... }:
with lib;

let 
  cfg = config.eth.hardware.keyboard;

in {

  options.eth.hardware.keyboard = {
    enableColemak = mkEnableOption "Eth's keyboard preferences";
  };

  config = mkIf cfg.enableColemak {

    console.useXkbConfig = true;

    services.xserver = {
      layout = "us";
      xkbVariant = "colemak";
      xkbOptions = "caps:escape";
    };

  };
}