fork/home-manager

git clone https://git.julia.blue/fork/home-manager

midchildandarwin: add support for 'defaults -currentHost' options572f348a

master
661 B29 linesraw
1{ config, lib, ... }:
2
3let
4  mkNullableOption = args:
5    lib.mkOption (args // {
6      type = lib.types.nullOr args.type;
7      default = null;
8    });
9
10  mkNullableEnableOption = name:
11    lib.mkOption {
12      type = with lib.types; nullOr bool;
13      default = null;
14      example = true;
15      description = "Whether to enable ${name}.";
16    };
17in {
18  freeformType = with lib.types; attrsOf (attrsOf anything);
19
20  options = {
21    "com.apple.controlcenter".BatteryShowPercentage = mkNullableOption {
22      type = lib.types.bool;
23      example = true;
24      description = ''
25        Whether to show battery percentage in the menu bar.
26      '';
27    };
28  };
29}