at master 1.2 kB view raw
1{ 2 config, 3 lib, 4 moduleType, 5 hostPkgs, 6 ... 7}: 8let 9 inherit (lib) mkOption types; 10in 11{ 12 options = { 13 interactive = mkOption { 14 description = '' 15 Tests [can be run interactively](#sec-running-nixos-tests-interactively) 16 using the program in the test derivation's `.driverInteractive` attribute. 17 18 When they are, the configuration will include anything set in this submodule. 19 20 You can set any top-level test option here. 21 22 Example test module: 23 24 ```nix 25 { config, lib, ... }: { 26 27 nodes.rabbitmq = { 28 services.rabbitmq.enable = true; 29 }; 30 31 # When running interactively ... 32 interactive.nodes.rabbitmq = { 33 # ... enable the web ui. 34 services.rabbitmq.managementPlugin.enable = true; 35 }; 36 } 37 ``` 38 39 For details, see the section about [running tests interactively](#sec-running-nixos-tests-interactively). 40 ''; 41 type = moduleType; 42 visible = "shallow"; 43 }; 44 }; 45 46 config = { 47 interactive.qemu.package = hostPkgs.qemu; 48 interactive.extraDriverArgs = [ "--interactive" ]; 49 passthru.driverInteractive = config.interactive.driver; 50 }; 51}