Files
dev/configs/nixos/registry/keybind.nix

26 lines
592 B
Nix

{ lib, util, ... }:
{
checks = [
{
assertion = util.registry.predicates.uniqueValue (entry: entry.value.keys);
message = "Desktop keybinds must use unique key chords.";
}
];
type = lib.types.submodule {
options = {
keys = lib.mkOption {
type = lib.types.str;
example = "SUPER + Return";
description = "Sets the key chord for this desktop keybind.";
};
command = lib.mkOption {
type = lib.types.str;
example = "ghostty";
description = "Command executed by this keybind.";
};
};
};
}