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 = {
localsend = lib.modules.importApply ./default.nix { };
localsend = module;
};
perSystem =
{ pkgs, ... }:
{ ... }:
{
checks = lib.optionalAttrs (pkgs.stdenv.isLinux) {
localsend = import ./tests/vm/default.nix {
inherit pkgs;
clan-core = self;
nixosLib = import (self.inputs.nixpkgs + "/nixos/lib") { };
};
clan.nixosTests.localsend = {
imports = [ ./tests/vm/default.nix ];
clan.modules."@clan/localsend" = module;
};
};
}

View File

@@ -1,24 +1,12 @@
{
pkgs,
nixosLib,
clan-core,
module,
...
}:
nixosLib.runTest (
{ ... }:
{
imports = [
clan-core.modules.nixosVmTest.clanTest
];
hostPkgs = pkgs;
name = "localsend";
clan = {
directory = ./.;
modules."@clan/localsend" = ../../default.nix;
inventory = {
machines.server = { };
@@ -48,4 +36,3 @@ nixosLib.runTest (
server.succeed("grep -q 'Address=192.168.56.2/24' /etc/systemd/network/09-zerotier.network")
'';
}
)