mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-19 23:03:01 +00:00
* nixos: remove with lib * nix-darwin: remove with lib * home-manager: remove with lib * modules/accounts: remove with lib * modules/config: remove with lib * modules/i18n: remove with lib * modules/misc: remove with lib * modules: remove with lib * modules/targets: remove with lib * tests/modules/firefox: remove with lib * tests/modules/services: remove with lib
29 lines
653 B
Nix
29 lines
653 B
Nix
{ 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.
|
|
'';
|
|
};
|
|
};
|
|
}
|