Move and refactor Kanata configuration
All checks were successful
/ check (push) Successful in 1m41s
All checks were successful
/ check (push) Successful in 1m41s
This commit is contained in:
parent
1be1e2dd8d
commit
d19c5e6bcd
8 changed files with 54 additions and 73 deletions
5
modules2/hosts/t480/kanata/devices.nix
Normal file
5
modules2/hosts/t480/kanata/devices.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
flake.modules.nixos.pc.services.kanata.devices = [
|
||||
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
|
||||
];
|
||||
}
|
3
modules2/hosts/t480/kanata/enable.nix
Normal file
3
modules2/hosts/t480/kanata/enable.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
flake.modules.nixos.pc.services.kanata.enable = true;
|
||||
}
|
29
modules2/kanata/config.nix
Normal file
29
modules2/kanata/config.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
flake.modules.nixos.pc.services.kanata.keyboards.default.config = ''
|
||||
(defsrc
|
||||
caps a s d f j k l ;
|
||||
)
|
||||
|
||||
(defvar
|
||||
tap-time 150
|
||||
hold-time 200
|
||||
hold-time-slow 300
|
||||
)
|
||||
|
||||
(defalias
|
||||
escctrl (tap-hold 100 100 esc lctl)
|
||||
a (tap-hold $tap-time $hold-time-slow a lmet)
|
||||
s (tap-hold $tap-time $hold-time-slow s lalt)
|
||||
d (tap-hold $tap-time $hold-time d lsft)
|
||||
f (tap-hold $tap-time $hold-time f lctl)
|
||||
j (tap-hold $tap-time $hold-time j rctl)
|
||||
k (tap-hold $tap-time $hold-time k rsft)
|
||||
l (tap-hold $tap-time $hold-time-slow l ralt)
|
||||
; (tap-hold $tap-time $hold-time-slow ; rmet)
|
||||
)
|
||||
|
||||
(deflayer base
|
||||
@escctrl @a @s @d @f @j @k @l @;
|
||||
)
|
||||
'';
|
||||
}
|
14
modules2/kanata/devices.nix
Normal file
14
modules2/kanata/devices.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
flake.modules.nixos.pc =
|
||||
{ config, ... }:
|
||||
{
|
||||
options.services.kanata.devices = lib.mkOption {
|
||||
default = [ ];
|
||||
type = lib.types.listOf lib.types.str;
|
||||
};
|
||||
|
||||
config.services.kanata.keyboards.default.devices = config.services.kanata.devices;
|
||||
};
|
||||
}
|
3
modules2/kanata/extra-config.nix
Normal file
3
modules2/kanata/extra-config.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
flake.modules.nixos.pc.services.kanata.keyboards.default.extraDefCfg = "process-unmapped-keys yes";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue