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
This commit is contained in:
parent
d965e119f2
commit
84b1c0c481
@ -29,8 +29,10 @@ line. For instance, to create a container that has
|
|||||||
<literal>root</literal>:
|
<literal>root</literal>:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container create foo --config 'services.openssh.enable = true; \
|
# nixos-container create foo --config '
|
||||||
users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];'
|
services.openssh.enable = true;
|
||||||
|
users.extraUsers.root.openssh.authorizedKeys.keys = ["ssh-dss AAAAB3N…"];
|
||||||
|
'
|
||||||
</screen>
|
</screen>
|
||||||
|
|
||||||
</para>
|
</para>
|
||||||
@ -97,8 +99,11 @@ This will build and activate the new configuration. You can also
|
|||||||
specify a new configuration on the command line:
|
specify a new configuration on the command line:
|
||||||
|
|
||||||
<screen>
|
<screen>
|
||||||
# nixos-container update foo --config 'services.httpd.enable = true; \
|
# nixos-container update foo --config '
|
||||||
services.httpd.adminAddr = "foo@example.org";'
|
services.httpd.enable = true;
|
||||||
|
services.httpd.adminAddr = "foo@example.org";
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
'
|
||||||
|
|
||||||
# curl http://$(nixos-container show-ip foo)/
|
# curl http://$(nixos-container show-ip foo)/
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">…
|
||||||
|
Loading…
x
Reference in New Issue
Block a user