This commit is contained in:
2026-07-24 11:51:58 -03:00
parent 57f2689be5
commit fedb2b87df
17 changed files with 492 additions and 463 deletions
+46
View File
@@ -0,0 +1,46 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.custom.keyd;
defaultRemap = {
main = {
capslock = "overload(control, esc)";
};
};
defaultNoop = {
main = { };
};
in
{
options.custom.keyd = {
enable = lib.mkEnableOption "keyd (system-wide key remapping daemon)";
# Vendor:product IDs that get the capslock overload. See `keyd monitor`.
internalIds = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ "1ea7:0907" ];
example = [ "1ea7:0907" ];
description = "Device IDs to apply the capslock overload to (matched against keyd's id list).";
};
};
config = lib.mkIf cfg.enable {
services.keyd = {
enable = true;
keyboards = {
internal = {
ids = cfg.internalIds;
settings = defaultRemap;
};
default = {
ids = [ "*" ];
settings = defaultNoop;
};
};
};
};
}