2022-04-24 07:19:56 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
mkNullableOption = args:
|
|
|
|
lib.mkOption (args // {
|
|
|
|
type = lib.types.nullOr args.type;
|
|
|
|
default = null;
|
|
|
|
});
|
|
|
|
|
|
|
|
mkNullableEnableOption = name:
|
|
|
|
lib.mkOption {
|
|
|
|
type = with lib.types; nullOr bool;
|
|
|
|
default = null;
|
|
|
|
example = true;
|
2023-06-30 23:30:13 +00:00
|
|
|
description = lib.mdDoc "Whether to enable ${name}.";
|
2022-04-24 07:19:56 +00:00
|
|
|
};
|
|
|
|
in {
|
|
|
|
freeformType = with lib.types; attrsOf (attrsOf anything);
|
|
|
|
|
|
|
|
options = {
|
|
|
|
"com.apple.controlcenter".BatteryShowPercentage = mkNullableOption {
|
|
|
|
type = lib.types.bool;
|
|
|
|
example = true;
|
2023-06-30 23:30:13 +00:00
|
|
|
description = lib.mdDoc ''
|
2022-04-24 07:19:56 +00:00
|
|
|
Whether to show battery percentage in the menu bar.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|