From 94b4db41750a7b6846ba57f643cb05d8bf94e1cb Mon Sep 17 00:00:00 2001 From: pacien Date: Mon, 14 Nov 2022 00:40:17 +0100 Subject: mkSandboxSystem: add tools and envVars option with printing --- example/flake.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'example') diff --git a/example/flake.nix b/example/flake.nix index 50931c6..17d15fc 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -50,6 +50,10 @@ # By default, the VM is launched in the current console without a graphical # interface, dropping to a shell for the default dummy user within. # + # The binaries made available through the `tools` option and the + # environment variable set through the `envVars` option are printed when + # entering the shell. + # # The current working directory from which the Flake is run is mounted and # made available within the virtual machine in /mnt. The root filesystem # is ephemeral (written to a temporary file in /tmp). @@ -64,6 +68,15 @@ name = "sandbox"; user = "dummy"; + tools = with pkgs; [ + postgresql + pgcli + ]; + + envVars = { + PGDATABASE = "app"; + }; + config = { virtualisation.forwardPorts = [ { from = "host"; host.port = 5432; guest.port = 5432; } # postgres -- cgit v1.2.3