flakes/modules/options.nix

54 lines
1 KiB
Nix
Raw Normal View History

{ config, lib, ... }:
let
inherit (lib)
mkOption
types;
in {
2025-03-23 11:52:43 +11:00
options.me = {
environment = mkOption {
type = types.enum [ "desktop" "laptop" "headless" ];
2025-03-23 11:52:43 +11:00
default = "desktop";
};
hasFingerprint = mkOption {
type = types.bool;
2025-03-23 11:52:43 +11:00
default = false;
};
gui = mkOption {
type = types.bool;
2025-03-23 11:52:43 +11:00
default = config.me.environment != "headless";
};
batteryDevice = mkOption {
type = with types; nullOr (uniq str);
default = null;
};
kbBacklightDevice = mkOption {
type = with types; nullOr (uniq str);
default = null;
};
hasBluetooth = mkOption {
type = types.bool;
default = config.me.environment == "laptop";
};
hasWifi = mkOption {
type = types.bool;
default = config.me.environment == "laptop";
};
hidpi = mkOption {
type = types.bool;
default = false;
};
binds = lib.mkOption {
type = with lib.types; attrsOf str;
default = {};
};
2025-03-23 11:52:43 +11:00
};
}