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

29 lines
637 B
Nix

{ lib, ... }:
{
checks = [
{
assertion = entries: lib.all (entry: entry.value.keys != [ ]) entries;
message = "Desktop keybinds must set at least one key.";
}
];
type = lib.types.submodule {
options = {
keys = lib.mkOption {
type = lib.types.listOf lib.types.str;
example = [
"SUPER"
"Return"
];
description = "Sets the ordered key parts for this desktop keybind.";
};
command = lib.mkOption {
type = lib.types.str;
example = "ghostty";
description = "Command executed by this keybind.";
};
};
};
}