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