add ids in keyd

This commit is contained in:
Ray Andrew 2025-03-03 23:13:16 -06:00
parent 6dfd55b17f
commit 9c6cd2b903
No known key found for this signature in database
2 changed files with 32 additions and 20 deletions

View file

@ -17,7 +17,14 @@
];
custom = {
keyd.enable = true;
keyd = {
enable = true;
ids = [
"0001:0001:70533846" # framework
"3434:06a0:d7dfbeabt" # keychron q10
"046d:c339:9f276ca6" # Logitech Pro
];
};
displaymanager.enable = true;
_1password.enable = true;
audio.enable = true;

View file

@ -4,23 +4,20 @@
pkgs,
...
}:
let
commonSettings = {
main = {
capslock = "layer(capslock)";
insert = "S-insert";
};
meta = {
w = "macro(C-w)";
a = "macro(C-a)";
};
"capslock:C" = { };
};
in
{
options.custom = with lib; {
keyd = {
enable = mkEnableOption "Enable keyd";
ids = mkOption {
type = types.listOf types.str;
default = [ ];
example = [
"0001:0001:70533846"
"3434:06a0:d7dfbeabt"
"046d:c339:9f276ca6"
];
description = "List of keyboard is that will be configured";
};
};
};
@ -31,7 +28,19 @@ in
];
users.groups.keyd = { };
services.keyd = {
services.keyd = let
commonSettings = {
main = {
capslock = "layer(capslock)";
insert = "S-insert";
};
meta = {
w = "macro(C-w)";
a = "macro(C-a)";
};
"capslock:C" = { };
};
in {
enable = true;
keyboards = {
default = {
@ -39,11 +48,7 @@ in
settings = commonSettings;
};
workstation = {
ids = [
"0001:0001:70533846" # framework
"3434:06a0:d7dfbeabt" # keychron q10
"046d:c339:9f276ca6" # Logitech Pro
];
ids = config.custom.keyd.ids;
settings = lib.mkMerge [
commonSettings
{