From 58f385f68005a6fed7b526ee2c19fef11d87038c Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 7 Feb 2023 20:41:29 +0100 Subject: lib/modules: Check against importing things with a _type --- lib/tests/modules/define-enable-with-top-level-mkIf.nix | 5 +++++ lib/tests/modules/module-imports-_type-check.nix | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 lib/tests/modules/define-enable-with-top-level-mkIf.nix create mode 100644 lib/tests/modules/module-imports-_type-check.nix (limited to 'lib/tests/modules') diff --git a/lib/tests/modules/define-enable-with-top-level-mkIf.nix b/lib/tests/modules/define-enable-with-top-level-mkIf.nix new file mode 100644 index 000000000000..4909c16d82b4 --- /dev/null +++ b/lib/tests/modules/define-enable-with-top-level-mkIf.nix @@ -0,0 +1,5 @@ +{ lib, ... }: +# I think this might occur more realistically in a submodule +{ + imports = [ (lib.mkIf true { enable = true; }) ]; +} diff --git a/lib/tests/modules/module-imports-_type-check.nix b/lib/tests/modules/module-imports-_type-check.nix new file mode 100644 index 000000000000..1e29c469daa5 --- /dev/null +++ b/lib/tests/modules/module-imports-_type-check.nix @@ -0,0 +1,3 @@ +{ + imports = [ { _type = "flake"; } ]; +} -- cgit 1.4.1