Skip to content

Commit

Permalink
nixos/kanata: specify linux-dev as a list
Browse files Browse the repository at this point in the history
This is better because it allows some special characters in the device
path.  See [1] for more information.

[1]: jtroo/kanata#647
  • Loading branch information
jian-lin authored and marcusramberg committed Dec 30, 2023
1 parent bc601db commit baf83df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nixos/modules/services/hardware/kanata.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit baf83df

Please sign in to comment.