summary refs log tree commit diff
path: root/nixos/lib/testing/interactive.nix
blob: 43886fa726788cb9ce6cc3c7541f0f523896b50b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ config, lib, moduleType, hostPkgs, ... }:
let
  inherit (lib) mkOption types mdDoc;
in
{
  options = {
    interactive = mkOption {
      description = mdDoc ''
        Tests [can be run interactively](#sec-running-nixos-tests-interactively).

        When they are, the configuration will include anything set in this submodule.

        You can set any top-level test option here.
      '';
      type = moduleType;
      visible = "shallow";
    };
  };

  config = {
    interactive.qemu.package = hostPkgs.qemu;
    interactive.extraDriverArgs = [ "--interactive" ];
    passthru.driverInteractive = config.interactive.driver;
  };
}