treewide: add kanata

This commit is contained in:
Anthony Rodriguez 2024-11-01 22:50:39 +01:00
parent c0f25e3097
commit 901b51531a
Signed by: nezia
GPG key ID: EE3BE97C040A86CE
4 changed files with 41 additions and 2 deletions

View file

@ -20,6 +20,7 @@ Additionally using a lot of other software you can find in the configuration fil
| [hosts](hosts/) | Host-specific |
| [lib](lib/) | Helper functions |
| [modules](modules/) | NixOS modules |
| [pkgs](pkgs/) | Custom packages |
| [system](system/) | NixOS configuration |
My configuration is structured based on the following principles:

View file

@ -15,10 +15,10 @@ in {
"${mod}/hardware/fprintd.nix"
"${mod}/services/power.nix"
"${mod}/services/brightness.nix"
"${mod}/services/keyd.nix"
"${mod}/services/logind.nix"
"${mod}/services/greetd.nix"
"${mod}/services/kanata.nix"
"${mod}/programs/niri"
"${mod}/services/gnome.nix"

View file

@ -3,6 +3,11 @@
pkgs,
...
}: {
imports = [./docker.nix ./gnupg.nix ./pipewire.nix ./kmscon.nix];
imports = [
./docker.nix
./gnupg.nix
./pipewire.nix
./kmscon.nix
];
services.udev.packages = [pkgs.segger-jlink inputs.self.packages.${pkgs.system}.mcuxpresso.ide];
}

View file

@ -0,0 +1,33 @@
_: {
services.kanata = {
enable = true;
keyboards.default = {
extraDefCfg = "process-unmapped-keys yes";
config = ''
(defsrc
caps a s d f j k l ;
)
(defvar
tap-time 150
hold-time 200
)
(defalias
escctrl (tap-hold 100 100 esc lctl)
a (tap-hold $tap-time $hold-time a lmet)
s (tap-hold $tap-time $hold-time 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 l ralt)
; (tap-hold $tap-time $hold-time ; rmet)
)
(deflayer base
@escctrl @a @s @d @f @j @k @l @;
)
'';
};
};
}