1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-16 08:09:45 +01:00
home-manager/modules/targets/darwin/user-defaults/opts-currenthost.nix
2022-07-24 15:17:21 +02:00

29 lines
661 B
Nix

{ 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;
description = "Whether to enable ${name}.";
};
in {
freeformType = with lib.types; attrsOf (attrsOf anything);
options = {
"com.apple.controlcenter".BatteryShowPercentage = mkNullableOption {
type = lib.types.bool;
example = true;
description = ''
Whether to show battery percentage in the menu bar.
'';
};
};
}