From 4642807f8d1523da5377148a8fd8912fb94d066d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Fri, 18 Oct 2024 11:54:44 +0100 Subject: [PATCH] docs: note how to not start a process when in testing --- docs/tests.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tests.md b/docs/tests.md index 404888a85..1ed482ab2 100644 --- a/docs/tests.md +++ b/docs/tests.md @@ -81,8 +81,8 @@ ncdu 2.2 !!! info "New in version 1.0.6" ```nix title="devenv.nix" -{ pkgs, config, ... }: { - services.postgres.enable = config.devenv.isTesting; +{ pkgs, lib, config, ... }: { + processes.myprocess.exec = lib.mkIf (!config.devenv.isTesting!) "myexecutable"; } ``` @@ -91,4 +91,4 @@ ncdu 2.2 - `wait_for_port `: waits for a port to be open If you'd like more functions to be added, take a look at [NixOS tests](https://nixos.org/manual/nixos/stable/#sec-nixos-tests) -and open an issue for what you need. \ No newline at end of file +and open an issue for what you need.