2014-04-14 18:26:48 +04:00
|
|
|
{ config, lib, pkgs, ... }:
|
2009-09-10 17:53:31 +04:00
|
|
|
|
2014-04-14 18:26:48 +04:00
|
|
|
with lib;
|
2009-04-29 03:05:03 +04:00
|
|
|
|
|
|
|
{
|
|
|
|
|
2009-09-10 17:53:31 +04:00
|
|
|
options = {
|
|
|
|
|
|
|
|
assertions = mkOption {
|
2013-10-28 19:14:15 +04:00
|
|
|
type = types.listOf types.unspecified;
|
2013-10-23 18:59:33 +04:00
|
|
|
internal = true;
|
2009-09-10 17:53:31 +04:00
|
|
|
default = [];
|
2012-04-01 14:54:06 +04:00
|
|
|
example = [ { assertion = false; message = "you can't enable this for that reason"; } ];
|
2009-09-10 17:53:31 +04:00
|
|
|
description = ''
|
|
|
|
This option allows modules to express conditions that must
|
|
|
|
hold for the evaluation of the system configuration to
|
|
|
|
succeed, along with associated error messages for the user.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2013-10-23 20:21:15 +04:00
|
|
|
warnings = mkOption {
|
|
|
|
internal = true;
|
|
|
|
default = [];
|
|
|
|
type = types.listOf types.string;
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2009-04-29 03:05:03 +04:00
|
|
|
};
|
2014-04-21 19:46:16 +04:00
|
|
|
# impl of assertions is in <nixos/modules/system/activation/top-level.nix>
|
2009-04-29 03:05:03 +04:00
|
|
|
}
|