From 84b1c0c481d4c97957252182a6273cea9062f4f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D0=BB=D0=BE=20=D0=93=D0=BB=D0=B8?= =?UTF-8?q?=D0=BD=D1=81=D1=8C=D0=BA=D0=B8=D0=B9=20=28Danylo=20Hlynskyi=29?= Date: Mon, 24 Apr 2017 18:31:02 +0300 Subject: [PATCH] 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 --- .../manual/administration/imperative-containers.xml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/nixos/doc/manual/administration/imperative-containers.xml b/nixos/doc/manual/administration/imperative-containers.xml index 258e1ea948da..9851eb08afb5 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 root: -# 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…"]; +' @@ -97,8 +99,11 @@ This will build and activate the new configuration. You can also specify a new configuration on the command line: -# 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)/ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…