dynix/tests/default.nix

32 lines
1 KiB
Nix
Raw Normal View History

2026-02-06 17:12:02 +01:00
{
pkgs ? import <nixpkgs> { },
2026-02-09 14:32:56 +01:00
qpkgs ? let
src = fetchTree (builtins.parseFlakeRef "github:Qyriad/nur-packages");
in import src { inherit pkgs; },
lib ? qpkgs.lib,
dynix ? qpkgs.callPackage ../modules-package.nix { },
}: let
runDynixTest = testModule: pkgs.testers.runNixOSTest {
imports = [ testModule ];
# Note: these are arguments to the *test* modules.
# Not the NixOS modules for the NixOS configuration the test is testing.
# Wew.
_module.args = { inherit dynix; };
# Why is this argument called "extraBaseModule**s**" but take a single module argument...
extraBaseModules = { name, ... }: {
#imports = [ dynixInjectionModule ];
config.environment.systemPackages = [ dynix ];
# Just making something in this strict in `name`,
# which is only present as an argument for nodes and I don't want to
# confuse that with the test modules.
config.warnings = builtins.seq name [ ];
};
};
in lib.makeScope lib.callPackageWith (self: {
basic = runDynixTest ./basic/test.nix;
2026-02-06 17:12:02 +01:00
})