summaryrefslogtreecommitdiffstats
path: root/modules/wrapper/warnings/default.nix
blob: f3675580c882a36d55f4e2a0a27bd3f015af355f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{lib, ...}: let
  inherit (lib.options) mkOption literalExpression;
  inherit (lib.types) listOf str unspecified;
in {
  options = {
    assertions = mkOption {
      type = listOf unspecified;
      internal = true;
      default = [];
      example = literalExpression ''
        [
          {
            assertion = false;
            message = "you can't enable this for that reason";
          }
        ]
      '';
    };

    warnings = mkOption {
      internal = true;
      default = [];
      type = listOf str;
      example = ["The `foo' service is deprecated and will go away soon!"];
      description = ''
        This option allows modules to show warnings to users during
        the evaluation of the system configuration.
      '';
    };
  };
}