mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-03 17:37:14 +00:00
modules: start breaking down core modules; simplify tree structure
This commit is contained in:
parent
4703ed7731
commit
370913e827
242 changed files with 178 additions and 124 deletions
31
modules/core/warnings/default.nix
Normal file
31
modules/core/warnings/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) types;
|
||||
inherit (lib.options) mkOption literalExpression;
|
||||
in {
|
||||
options = {
|
||||
assertions = mkOption {
|
||||
type = with types; listOf unspecified;
|
||||
internal = true;
|
||||
default = [];
|
||||
example = literalExpression ''
|
||||
[
|
||||
{
|
||||
assertion = false;
|
||||
message = "you can't enable this for that reason";
|
||||
}
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
warnings = mkOption {
|
||||
internal = true;
|
||||
default = [];
|
||||
type = with types; 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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue