summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorДанило Глинський (Danylo Hlynskyi) <abcz2.uprola@gmail.com>2017-04-24 18:31:02 +0300
committerProfpatsch <mail@profpatsch.de>2017-04-24 22:31:02 +0200
commit84b1c0c481d4c97957252182a6273cea9062f4f7 (patch)
tree8dc72c858514dba37296d4fb00f6846527a79851 /nixos
parentd965e119f2a3bced33b7eb56d7235159d57306d9 (diff)
downloadnixpkgs-84b1c0c481d4c97957252182a6273cea9062f4f7.tar
nixpkgs-84b1c0c481d4c97957252182a6273cea9062f4f7.tar.gz
nixpkgs-84b1c0c481d4c97957252182a6273cea9062f4f7.tar.bz2
nixpkgs-84b1c0c481d4c97957252182a6273cea9062f4f7.tar.lz
nixpkgs-84b1c0c481d4c97957252182a6273cea9062f4f7.tar.xz
nixpkgs-84b1c0c481d4c97957252182a6273cea9062f4f7.tar.zst
nixpkgs-84b1c0c481d4c97957252182a6273cea9062f4f7.zip
Fix imperative container code examples
Since some time Nixos has firewall enabled by default, so update example.
Also, remove newline escaping (it isn't needed).

Closes https://github.com/NixOS/nixpkgs/issues/25174
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/administration/imperative-containers.xml13
1 files changed, 9 insertions, 4 deletions
diff --git a/nixos/doc/manual/administration/imperative-containers.xml b/nixos/doc/manual/administration/imperative-containers.xml
index 258e1ea948d..9851eb08afb 100644
--- a/nixos/doc/manual/administration/imperative-containers.xml
+++ b/nixos/doc/manual/administration/imperative-containers.xml
@@ -29,8 +29,10 @@ line. For instance, to create a container that has
 <literal>root</literal>:
 
 <screen>
-# nixos-container create foo --config 'services.openssh.enable = true; \
-  users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];'
+# nixos-container create foo --config '
+  services.openssh.enable = true;
+  users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];
+'
 </screen>
 
 </para>
@@ -97,8 +99,11 @@ This will build and activate the new configuration. You can also
 specify a new configuration on the command line:
 
 <screen>
-# nixos-container update foo --config 'services.httpd.enable = true; \
-  services.httpd.adminAddr = "foo@example.org";'
+# nixos-container update foo --config '
+  services.httpd.enable = true;
+  services.httpd.adminAddr = "foo@example.org";
+  networking.firewall.allowedTCPPorts = [ 80 ];
+'
 
 # curl http://$(nixos-container show-ip foo)/
 &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…