From 48894654304a0c32501a7eead16229f1b654a7e7 Mon Sep 17 00:00:00 2001 From: Andrew Hayzen Date: Sun, 21 Apr 2024 19:39:33 +0100 Subject: [PATCH] docs: add more info around how to test via VMs --- docs/commands/testing.md | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/commands/testing.md b/docs/commands/testing.md index ab99b0e2..104f2439 100644 --- a/docs/commands/testing.md +++ b/docs/commands/testing.md @@ -4,8 +4,27 @@ SPDX-FileCopyrightText: Andrew Hayzen SPDX-License-Identifier: MPL-2.0 --> +# Test with flake check + +We need the sandbox disabled as we need network access + +```console +$ nix flake --option sandbox false check -L --show-trace +``` + # Test in a VM +Ensure that you add the following snippet to the configuration of the machine you want to test in a VM. + +```nix +{ + ahayzen.testing = true; +} +``` + +> Note that if you are testing http update any `Caddyfile.vm` to use `http://localhost` +> rather than `http://mydomain.com` to access locally. + ## `nixos-build` ```console @@ -31,11 +50,3 @@ $ result/bin/run--vm ```console $ ssh -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no admin@localhost -p 2221 ``` - -## Flake check - -We need the sandbox disabled as we need network access - -```console -$ nix flake --option sandbox false check -L --show-trace -```