60 lines
2.8 KiB
Nix
60 lines
2.8 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
|
||
|
lsft z x c v b n m , . / rsft up kp1 kp2 kp3 kprt
|
||
|
lctl lmet lalt spc ralt rmet rctl 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
|
||
|
lsft z x c v b k m , . / rsft up kp1 kp2 kp3 kprt
|
||
|
lctl lmet lalt spc ralt rmet rctl 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
|
||
|
lsft z x c v b n m , . / rsft up kp1 kp2 kp3 kprt
|
||
|
lctl lmet lalt spc ralt rmet rctl lft down rght kp0 kp.)
|
||
|
|
||
|
(defalias
|
||
|
cap (tap-hold 100 100 bspc lctl)
|
||
|
col (layer-switch colemak)
|
||
|
qwe (layer-switch qwerty)
|
||
|
)
|
||
|
'';
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
};
|
||
|
}
|