nixos-wiki-infra/checks/lib.nix

23 lines
791 B
Nix
Raw Permalink Normal View History

2023-11-19 09:23:50 +01:00
# tests/lib.nix
# The first argument to this function is the test module itself
test:
# These arguments are provided by `flake.nix` on import, see checkArgs
{ pkgs, self }:
let
inherit (pkgs) lib;
# this imports the nixos library that contains our testing framework
nixos-lib = import (pkgs.path + "/nixos/lib") { };
in
(nixos-lib.runTest {
hostPkgs = pkgs;
# This speeds up the evaluation by skipping evaluating documentation (optional)
defaults.documentation.enable = lib.mkDefault false;
# This makes `self` available in the NixOS configuration of our virtual machines.
# This is useful for referencing modules or packages from your own flake
# as well as importing from other flakes.
2024-09-28 16:15:00 +02:00
node.specialArgs = {
inherit self;
};
2023-11-19 09:23:50 +01:00
imports = [ test ];
}).config.result