about summary refs log tree commit diff
path: root/nixos/doc/manual/administration/declarative-containers.section.md
diff options
context:
space:
mode:
authorannalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>2024-03-28 13:02:34 +0000
committerannalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com>2024-03-28 13:02:34 +0000
commit675fb1648e6925ca87437bc98fce2077648e8be3 (patch)
tree7f48f889770fe72ecdc74d853af022bb8bc214d7 /nixos/doc/manual/administration/declarative-containers.section.md
parent035b7f36aa1367c00845f669ef0617e55d31104f (diff)
parent69de1e1beb4fa322688a2bac5761e59a2b17e15e (diff)
Merge remote-tracking branch 'upstream/staging-next' into staging
 Conflicts:
	pkgs/development/python-modules/apsw/default.nix
	pkgs/development/python-modules/deal/default.nix
	pkgs/development/python-modules/kubernetes/default.nix
Diffstat (limited to 'nixos/doc/manual/administration/declarative-containers.section.md')
-rw-r--r--nixos/doc/manual/administration/declarative-containers.section.md28
1 files changed, 16 insertions, 12 deletions
diff --git a/nixos/doc/manual/administration/declarative-containers.section.md b/nixos/doc/manual/administration/declarative-containers.section.md
index eaa50d3c663d4..f16fa8332b51e 100644
--- a/nixos/doc/manual/administration/declarative-containers.section.md
+++ b/nixos/doc/manual/administration/declarative-containers.section.md
@@ -5,13 +5,15 @@ You can also specify containers and their configuration in the host's
 shall be a container named `database` running PostgreSQL:
 
 ```nix
-containers.database =
-  { config =
-      { config, pkgs, ... }:
-      { services.postgresql.enable = true;
-      services.postgresql.package = pkgs.postgresql_14;
-      };
-  };
+{
+  containers.database =
+    { config =
+        { config, pkgs, ... }:
+        { services.postgresql.enable = true;
+        services.postgresql.package = pkgs.postgresql_14;
+        };
+    };
+}
 ```
 
 If you run `nixos-rebuild switch`, the container will be built. If the
@@ -25,11 +27,13 @@ cannot change the network configuration. You can give a container its
 own network as follows:
 
 ```nix
-containers.database = {
-  privateNetwork = true;
-  hostAddress = "192.168.100.10";
-  localAddress = "192.168.100.11";
-};
+{
+  containers.database = {
+    privateNetwork = true;
+    hostAddress = "192.168.100.10";
+    localAddress = "192.168.100.11";
+  };
+}
 ```
 
 This gives the container a private virtual Ethernet interface with IP