diff options
author | pacien | 2022-11-14 00:40:17 +0100 |
---|---|---|
committer | pacien | 2022-11-14 00:40:17 +0100 |
commit | 94b4db41750a7b6846ba57f643cb05d8bf94e1cb (patch) | |
tree | 9a2b81b2ce8347ae300f57a39ac9cf808a83a92c /example | |
parent | e8459a4a34f2611a547b966b2c58867d99d0f40c (diff) | |
download | flaky-utils-94b4db41750a7b6846ba57f643cb05d8bf94e1cb.tar.gz |
mkSandboxSystem: add tools and envVars option with printing
Diffstat (limited to 'example')
-rw-r--r-- | example/flake.nix | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ | |||
50 | # By default, the VM is launched in the current console without a graphical | 50 | # By default, the VM is launched in the current console without a graphical |
51 | # interface, dropping to a shell for the default dummy user within. | 51 | # interface, dropping to a shell for the default dummy user within. |
52 | # | 52 | # |
53 | # The binaries made available through the `tools` option and the | ||
54 | # environment variable set through the `envVars` option are printed when | ||
55 | # entering the shell. | ||
56 | # | ||
53 | # The current working directory from which the Flake is run is mounted and | 57 | # The current working directory from which the Flake is run is mounted and |
54 | # made available within the virtual machine in /mnt. The root filesystem | 58 | # made available within the virtual machine in /mnt. The root filesystem |
55 | # is ephemeral (written to a temporary file in /tmp). | 59 | # is ephemeral (written to a temporary file in /tmp). |
@@ -64,6 +68,15 @@ | |||
64 | name = "sandbox"; | 68 | name = "sandbox"; |
65 | user = "dummy"; | 69 | user = "dummy"; |
66 | 70 | ||
71 | tools = with pkgs; [ | ||
72 | postgresql | ||
73 | pgcli | ||
74 | ]; | ||
75 | |||
76 | envVars = { | ||
77 | PGDATABASE = "app"; | ||
78 | }; | ||
79 | |||
67 | config = { | 80 | config = { |
68 | virtualisation.forwardPorts = [ | 81 | virtualisation.forwardPorts = [ |
69 | { from = "host"; host.port = 5432; guest.port = 5432; } # postgres | 82 | { from = "host"; host.port = 5432; guest.port = 5432; } # postgres |