Revert "Revert "Revert "doc: Update section about imperative containers"""
nixos-container can now execute nix commands again inside the container This reverts commit 9622cd3b38ddbc7faa4cac2a48dbd70bd99570d0.
This commit is contained in:
parent
3624bb5362
commit
bb31835b1d
@ -73,7 +73,8 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To change the configuration of the container, you can edit
|
There are several ways to change the configuration of the container. First,
|
||||||
|
on the host, you can edit
|
||||||
<literal>/var/lib/container/<replaceable>name</replaceable>/etc/nixos/configuration.nix</literal>,
|
<literal>/var/lib/container/<replaceable>name</replaceable>/etc/nixos/configuration.nix</literal>,
|
||||||
and run
|
and run
|
||||||
<screen>
|
<screen>
|
||||||
@ -86,7 +87,8 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
|
|||||||
<xref linkend="opt-services.httpd.enable"/> = true;
|
<xref linkend="opt-services.httpd.enable"/> = true;
|
||||||
<xref linkend="opt-services.httpd.adminAddr"/> = "foo@example.org";
|
<xref linkend="opt-services.httpd.adminAddr"/> = "foo@example.org";
|
||||||
<xref linkend="opt-networking.firewall.allowedTCPPorts"/> = [ 80 ];
|
<xref linkend="opt-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">…
|
||||||
</screen>
|
</screen>
|
||||||
@ -95,13 +97,11 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note that in previous versions of NixOS (17.09 and earlier) one could also
|
Alternatively, you can change the configuration from within the container
|
||||||
use all nix-related commands (like <command>nixos-rebuild switch</command>)
|
itself by running <command>nixos-rebuild switch</command> inside the
|
||||||
from inside the container. However, since the release of Nix 2.0 this is not
|
container. Note that the container by default does not have a copy of the
|
||||||
supported anymore. Supporting Nix commands inside the container might be
|
NixOS channel, so you should run <command>nix-channel --update</command>
|
||||||
possible again in future versions. See
|
first.
|
||||||
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/40355">the github
|
|
||||||
issue</link> for tracking progress on this issue.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user