dynix/tests/default.nix
2026-02-10 14:18:45 +01:00

31 lines
1 KiB
Nix

{
pkgs ? import <nixpkgs> { },
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;
})