summaryrefslogtreecommitdiff
path: root/hosts/local/fw11/keyboard.nix
blob: a6a1175c5311f38e5e0557d90d8fc3f3319bc8c5 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  config,
  lib,
  pkgs,
  ...
}: {
  services.logind.extraConfig = ''
    # don’t shutdown when power button is short-pressed
    HandlePowerKey=ignore
  '';

  # config file keeps getting rewritten but I don't know by who
  i18n.inputMethod = {
    enable = true;
    type = "fcitx5";
    fcitx5.addons = with pkgs; [
      fcitx5-mozc
      # mozc-ut is better, wat do
      fcitx5-gtk
      libsForQt5.fcitx5-qt
      fcitx5-lua
      fcitx5-configtool
      fcitx5-rime
    ];
  };
  environment.variables = {
    GTK_IM_MODULE = "fcitx";
    QT_IM_MODULE = "fcitx";
    XMODIFIERS = "@im=fcitx";
    FCITX_SOCKET = "default";
  };

  #kmonad
  services.kmonad = {
    enable = true;
    keyboards = {
      myKmonadOutput = {
        device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
        config = builtins.readFile ./framework.kbd;
      };
    };
    # keyboards.internal = {
    # device = builtins.pathExists /dev.input/by-id/usb-Lenovo_ThinkPad_Compact_USB_Keyboard_with_TrackPoint-event-kbd
    # device = "/dev/input/by-id/usb-lenovo_thinkpad_compact_usb_keyboard_with_trackpoint-event-kbd";
    # config = builtins.readfile ./thinkpad.kbd;

    # defcfg = {
    #   enable = true;
    #   fallthrough = true;
    #  };
    # };
  };
}