introduce flake parts module for clan nixos tests

This commit is contained in:
Jörg Thalheim
2025-06-17 18:38:49 +02:00
parent 3ea159721c
commit 7515d54d9e
4 changed files with 116 additions and 48 deletions

View File

@@ -1,6 +1,5 @@
{
self,
inputs,
lib,
...
}:
@@ -14,7 +13,7 @@ in
wifi = module;
};
perSystem =
{ pkgs, ... }:
{ ... }:
{
/**
1. Prepare the test vars
@@ -23,15 +22,10 @@ in
2. To run the test
nix build .#checks.x86_64-linux.hello-service
*/
checks =
# Currently we don't support nixos-integration tests on darwin
lib.optionalAttrs (pkgs.stdenv.isLinux) {
wifi-service = import ./tests/vm/default.nix {
inherit module;
inherit inputs pkgs;
clan-core = self;
nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
};
};
clan.nixosTests.wifi-service = {
imports = [ ./tests/vm/default.nix ];
clan.modules."@clan/wifi" = module;
};
};
}