blob: 243c9cfb95ff6ba5c90e7e358da0cd6d002e523e (
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
|
{
lib,
pkgs,
config,
...
}:
{
options.programs.mnw = lib.mkOption {
type = lib.types.submoduleWith {
specialArgs = {
inherit pkgs;
modulesPath = toString ./.;
};
modules = [
./options.nix
];
};
};
config = lib.mkIf config.programs.mnw.enable {
warnings = map (warning: "programs.mnw: ${warning}") config.programs.mnw.warnings;
assertions = map (assertion: {
inherit (assertion) assertion;
message = "programs.mnw: ${assertion.message}";
}) config.programs.mnw.assertions;
};
}
|