64 lines
3 KiB
Nix
64 lines
3 KiB
Nix
{ config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.eboskma.kanata;
|
|
in
|
|
{
|
|
options.eboskma.kanata = {
|
|
enable = mkEnableOption "kanata";
|
|
devices = mkOption {
|
|
description = "Devices to enable kanata for";
|
|
type = types.listOf types.path;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
services.kanata = {
|
|
enable = true;
|
|
|
|
keyboards = {
|
|
ducky = {
|
|
devices = cfg.devices;
|
|
|
|
config = ''
|
|
(defsrc
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc scrlck pp calc mute voldwn volu
|
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup nlck kp/ kp* kp-
|
|
tab q w e r t y u i o p [ ] \ del end pgdn kp7 kp8 kp9 kp+
|
|
caps a s d f g h j k l ; ' ret kp4 kp5 kp6
|
|
lshift z x c v b n m , . / rshift up kp1 kp2 kp3 kprt
|
|
lctrl lmeta lalt spc ralt rmeta rctrl lft down rght kp0 kp.)
|
|
|
|
(deflayer colemak
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc @qwe pp calc mute voldwn volu
|
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup nlck kp/ kp* kp-
|
|
tab q w f p g j l u y ; [ ] \ del end pgdn kp7 kp8 kp9 kp+
|
|
@cap a r s t d h n e i o ' ret kp4 kp5 kp6
|
|
lshift z x c v b k m , . / rshift up kp1 kp2 kp3 kprt
|
|
lctrl lmeta lalt spc ralt rmeta rctrl lft down rght kp0 kp.)
|
|
|
|
(deflayer qwerty
|
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 prtsc @col pp calc mute voldwn volu
|
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc ins home pgup nlck kp/ kp* kp-
|
|
tab q w e r t y u i o p [ ] \ del end pgdn kp7 kp8 kp9 kp+
|
|
@cap a s d f g h j k l ; ' ret kp4 kp5 kp6
|
|
lshift z x c v b n m , . / rshift up kp1 kp2 kp3 kprt
|
|
lctrl lmeta lalt spc ralt rmeta rctrl lft down rght kp0 kp.)
|
|
|
|
(defalias
|
|
cap (tap-hold 100 100 bspc lctrl)
|
|
col (layer-switch colemak)
|
|
qwe (layer-switch qwerty)
|
|
)
|
|
'';
|
|
|
|
extraDefCfg = ''
|
|
process-unmapped-keys yes
|
|
;; This is added in 1.7.0-prerelease-2
|
|
;; allow-hardware-repeat no
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|