aboutsummaryrefslogtreecommitdiff
path: root/example/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'example/flake.nix')
-rw-r--r--example/flake.nix13
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