nixpkgs/lib/tests/modules/class-check.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
724 B
Nix
Raw Normal View History

{ lib, ... }: {
config = {
_module.freeformType = lib.types.anything;
ok =
lib.evalModules {
specialArgs.class = "nixos";
modules = [
./module-class-is-nixos.nix
];
};
fail =
lib.evalModules {
specialArgs.class = "nixos";
modules = [
./module-class-is-nixos.nix
./module-class-is-darwin.nix
];
};
fail-anon =
lib.evalModules {
specialArgs.class = "nixos";
modules = [
./module-class-is-nixos.nix
{ _file = "foo.nix#darwinModules.default";
class = "darwin";
config = {};
imports = [];
}
];
};
};
}