From cbdf8745eb135549403ac293e7e62c6d9a63edb9 Mon Sep 17 00:00:00 2001 From: kurogeek Date: Wed, 23 Jul 2025 12:07:03 +0700 Subject: [PATCH 1/2] nixosTests option is exposed via flakeModules.testModule --- flakeModules/flake-module.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flakeModules/flake-module.nix b/flakeModules/flake-module.nix index bd840e510..aeb74c713 100644 --- a/flakeModules/flake-module.nix +++ b/flakeModules/flake-module.nix @@ -1,7 +1,22 @@ -{ self, config, ... }: +{ + self, + inputs, + config, + lib, + flake-parts-lib, + ... +}: { flake.flakeModules = { clan = import ./clan.nix self; default = config.flake.flakeModules.clan; + testModule = import ../lib/flake-parts/clan-nixos-test.nix { + inherit + self + inputs + lib + flake-parts-lib + ; + }; }; } From 555c2e1bc9c1664ffe04c646e0a7be4f1aa60295 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Tue, 16 Sep 2025 17:14:33 +0200 Subject: [PATCH 2/2] clan-core: use importApply for testModule export --- flakeModules/flake-module.nix | 3 ++- lib/flake-parts/clan-nixos-test.nix | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flakeModules/flake-module.nix b/flakeModules/flake-module.nix index aeb74c713..17514d000 100644 --- a/flakeModules/flake-module.nix +++ b/flakeModules/flake-module.nix @@ -10,7 +10,8 @@ flake.flakeModules = { clan = import ./clan.nix self; default = config.flake.flakeModules.clan; - testModule = import ../lib/flake-parts/clan-nixos-test.nix { + # testModule is an unstable interface and can change at any time. + testModule = lib.modules.importApply ../lib/flake-parts/clan-nixos-test.nix { inherit self inputs diff --git a/lib/flake-parts/clan-nixos-test.nix b/lib/flake-parts/clan-nixos-test.nix index 7b0771a8f..40e631929 100644 --- a/lib/flake-parts/clan-nixos-test.nix +++ b/lib/flake-parts/clan-nixos-test.nix @@ -24,7 +24,7 @@ in in { options.clan.nixosTests = mkOption { - description = "Clan NixOS tests configuration"; + description = "Unstable interface! Clan NixOS tests configuration"; type = types.attrsOf types.unspecified; default = { }; };