localsend: migrate to clan.nixosTests module

This commit is contained in:
Jörg Thalheim
2025-06-17 19:29:08 +02:00
parent 5d4dc437c2
commit 6bc4523835
2 changed files with 35 additions and 47 deletions

View File

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

View File

@@ -1,24 +1,12 @@
{ {
pkgs, module,
nixosLib,
clan-core,
... ...
}: }:
{
nixosLib.runTest (
{ ... }:
{
imports = [
clan-core.modules.nixosVmTest.clanTest
];
hostPkgs = pkgs;
name = "localsend"; name = "localsend";
clan = { clan = {
directory = ./.; directory = ./.;
modules."@clan/localsend" = ../../default.nix;
inventory = { inventory = {
machines.server = { }; machines.server = { };
@@ -47,5 +35,4 @@ nixosLib.runTest (
# Verify the 09-zerotier network is configured with the specified IP address # Verify the 09-zerotier network is configured with the specified IP address
server.succeed("grep -q 'Address=192.168.56.2/24' /etc/systemd/network/09-zerotier.network") server.succeed("grep -q 'Address=192.168.56.2/24' /etc/systemd/network/09-zerotier.network")
''; '';
} }
)