From ff19ecca713ecfeabbc53688582909dd9d96f33e Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sat, 23 Dec 2023 08:08:19 +0800 Subject: [PATCH] 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 --- nixos/modules/services/hardware/kanata.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/hardware/kanata.nix b/nixos/modules/services/hardware/kanata.nix index 0b77bfbc33b3..05e76d843215 100644 --- a/nixos/modules/services/hardware/kanata.nix +++ b/nixos/modules/services/hardware/kanata.nix @@ -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