nixos/doc/writing-nixos-tests: Remove flake info for now

This commit is contained in:
Robert Hensing 2022-09-24 17:32:56 +01:00
parent f40ff7f1f1
commit 3ce4179374
2 changed files with 1 additions and 22 deletions

View File

@ -70,20 +70,9 @@ nix-build -A nixosTests.hostname
Outside the `nixpkgs` repository, you can instantiate the test by first importing the NixOS library,
```nix
# regular nix
let nixos-lib = import (nixpkgs + "/nixos/lib") { };
in
```
```nix
# flake
let nixos-lib = nixpkgs.lib.nixos;
in
```
... and then invoking `runTest`, for example:
```nix
nixos-lib.runTest {
imports = [ ./test.nix ];
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs

View File

@ -88,19 +88,9 @@ nix-build -A nixosTests.hostname
instantiate the test by first importing the NixOS library,
</para>
<programlisting language="bash">
# regular nix
let nixos-lib = import (nixpkgs + &quot;/nixos/lib&quot;) { };
in
</programlisting>
<programlisting language="bash">
# flake
let nixos-lib = nixpkgs.lib.nixos;
in
</programlisting>
<para>
… and then invoking <literal>runTest</literal>, for example:
</para>
<programlisting language="bash">
nixos-lib.runTest {
imports = [ ./test.nix ];
hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs