mob next [ci-skip] [ci skip] [skip ci]

lastFile:tests/lib.nix
This commit is contained in:
2025-11-24 09:35:49 +07:00
parent bfeea4156b
commit 1cd2643691
11 changed files with 384 additions and 1 deletions

18
tests/lib.nix Normal file
View File

@@ -0,0 +1,18 @@
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.
node.specialArgs = { inherit self; };
imports = [ test ];
}).config.result