about summary refs log tree commit diff
path: root/modules/workstation/hardware/keyboard/default.nix
blob: d2b13640277c48c861cd9f4ff65829358274c0e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{ pkgs, config, ... }:

let
  xcfg = config.services.xserver;

in
{
  i18n.consoleUseXkbConfig = true;
  services.xserver.layout = "dvorak";
  services.xserver.xkbOptions = "ctrl:nocaps,compose:menu";

  environment.variables.XKB_DEFAULT_LAYOUT = xcfg.layout;
  environment.variables.XKB_DEFAULT_OPTIONS = xcfg.xkbOptions;

  services.evscript.enable = true;
  services.evscript.script = ./events.dyon;

  boot.postBootCommands = ''
    # Remap tab to left super
    /run/current-system/sw/bin/setkeycodes 0f 125
  '';
}