Skip to content

Kanata

services.kanata.enable

Whether to enable kanata, a tool to improve keyboard comfort and usability with advanced customization. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.keyboards

Keyboard configurations. Type: attribute set of (submodule)

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.keyboards.<name>.config

Configuration other than defcfg.

See the upstream documentation and example config files for more information.

Type: strings concatenated with "\n"

Example

`#!nix '' (defsrc caps)

(deflayermap (default-layer) ;; tap caps lock as caps lock, hold caps lock as left control caps (tap-hold 100 100 caps lctl)) ''`

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.keyboards.<name>.configFile

The config file.

By default, it is generated by values from other kanata module options.

You can also set it to your own full config file which overrides all other kanata module options. See the upstream documentation and example config files for more information.

Type: path

Default

"A config file generated by values from other kanata module options."

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.keyboards.<name>.devices

Paths to keyboard devices.

An empty list, the default value, lets kanata detect which input devices are keyboards and intercept them all.

Type: list of string

Default

[ ]

Example

["/dev/input/by-id/usb-0000_0000-event-kbd"]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.keyboards.<name>.extraArgs

Extra command line arguments passed to kanata. Type: list of string

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.keyboards.<name>.extraDefCfg

Configuration of defcfg other than linux-dev (generated from the devices option) and linux-continue-if-no-devs-found (hardcoded to be yes).

See the upstream documentation and example config files for more information.

Type: strings concatenated with "\n"

Default

""

Example

"danger-enable-cmd yes"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.keyboards.<name>.port

Port to run the TCP server on. null will not run the server.

Type: null or 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

null

Example

6666

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix

services.kanata.package

The kanata package to use. ::: {.note} If {option}danger-enable-cmd is enabled in any of the keyboards, the kanata-with-cmd package should be used. :::

Type: package

Default

pkgs.kanata

Example

pkgs.kanata-with-cmd

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/hardware/kanata.nix