at 25.11-pre 987 B view raw
1{ lib, ... }: 2{ 3 4 options = { 5 6 assertions = lib.mkOption { 7 type = lib.types.listOf lib.types.unspecified; 8 internal = true; 9 default = [ ]; 10 example = [ 11 { 12 assertion = false; 13 message = "you can't enable this for that reason"; 14 } 15 ]; 16 description = '' 17 This option allows modules to express conditions that must 18 hold for the evaluation of the system configuration to 19 succeed, along with associated error messages for the user. 20 ''; 21 }; 22 23 warnings = lib.mkOption { 24 internal = true; 25 default = [ ]; 26 type = lib.types.listOf lib.types.str; 27 example = [ "The `foo' service is deprecated and will go away soon!" ]; 28 description = '' 29 This option allows modules to show warnings to users during 30 the evaluation of the system configuration. 31 ''; 32 }; 33 34 }; 35 # impl of assertions is in <nixpkgs/nixos/modules/system/activation/top-level.nix> 36}