trusted-nix-caches: migrate to clan.nixosTests module

This commit is contained in:
Jörg Thalheim
2025-06-17 19:34:19 +02:00
parent 8e2fc1056f
commit d31c9d1537
2 changed files with 26 additions and 43 deletions

View File

@@ -1,17 +1,16 @@
{ lib, self, ... }: { lib, ... }:
let
module = lib.modules.importApply ./default.nix { };
in
{ {
clan.modules = { clan.modules.trusted-nix-caches = module;
trusted-nix-caches = lib.modules.importApply ./default.nix { };
};
perSystem = perSystem =
{ pkgs, ... }: { ... }:
{ {
checks = lib.optionalAttrs (pkgs.stdenv.isLinux) { clan.nixosTests.trusted-nix-caches = {
trusted-nix-caches = import ./tests/vm/default.nix { imports = [ ./tests/vm/default.nix ];
inherit pkgs;
clan-core = self; clan.modules."@clan/trusted-nix-caches" = module;
nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
};
}; };
}; };
} }

View File

@@ -1,23 +1,8 @@
{ {
pkgs,
nixosLib,
clan-core,
...
}:
nixosLib.runTest (
{ ... }:
{
imports = [
clan-core.modules.nixosVmTest.clanTest
];
hostPkgs = pkgs;
name = "trusted-nix-caches"; name = "trusted-nix-caches";
clan = { clan = {
directory = ./.; directory = ./.;
modules."@clan/trusted-nix-caches" = ../../default.nix;
inventory = { inventory = {
machines.server = { }; machines.server = { };
@@ -37,4 +22,3 @@ nixosLib.runTest (
server.succeed("grep -q 'cache.clan.lol' /etc/nix/nix.conf") server.succeed("grep -q 'cache.clan.lol' /etc/nix/nix.conf")
''; '';
} }
)