nixos/kanata: specify linux-dev as a list

This is better because it allows some special characters in the device
path.  See [1] for more information.

[1]: https://github.com/jtroo/kanata/pull/647
This commit is contained in:
Lin Jian 2023-12-23 08:08:19 +08:00
parent ee63fd6a49
commit ff19ecca71
No known key found for this signature in database
GPG Key ID: A6698D36434F75A5

View File

@ -78,7 +78,13 @@ let
mkName = name: "kanata-${name}";
mkDevices = devices:
optionalString ((length devices) > 0) "linux-dev ${concatStringsSep ":" devices}";
let
devicesString = pipe devices [
(map (device: "\"" + device + "\""))
(concatStringsSep " ")
];
in
optionalString ((length devices) > 0) "linux-dev (${devicesString})";
mkConfig = name: keyboard: pkgs.writeText "${mkName name}-config.kdb" ''
(defcfg