From f309440ee3b6830fd886f824be81b0fecfba52fc Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Fri, 28 Sep 2018 11:25:32 +0200 Subject: doc: Update section about imperative containers Nix commands inside the container have been broken since 18.03, and no fix is yet in sight. Lets remove from the documentation that this is a usecase that we support, as it doesn't seem likely that this will be fixed before 18.09 either. See #40355 --- .../administration/imperative-containers.xml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'nixos/doc/manual/administration') diff --git a/nixos/doc/manual/administration/imperative-containers.xml b/nixos/doc/manual/administration/imperative-containers.xml index 9bb62bc2ece9e..cfd0e5c172b13 100644 --- a/nixos/doc/manual/administration/imperative-containers.xml +++ b/nixos/doc/manual/administration/imperative-containers.xml @@ -73,8 +73,7 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux - There are several ways to change the configuration of the container. First, - on the host, you can edit + To change the configuration of the container, you can edit /var/lib/container/name/etc/nixos/configuration.nix, and run @@ -87,7 +86,16 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux = true; = "foo@example.org"; = [ 80 ]; -' + ' + + + Note that in previous versions of NixOS (17.09 and earlier) one could + also use all nix-related commands (like nixos-rebuild switch) + from inside the container. However, since the release of Nix 2.0 this + is not supported anymore. Supporting Nix commands inside the + container might be possible again in future versions. See + the github issue for tracking progress on this issue. + # curl http://$(nixos-container show-ip foo)/ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">… @@ -96,14 +104,6 @@ Linux foo 3.4.82 #1-NixOS SMP Thu Mar 20 14:44:05 UTC 2014 x86_64 GNU/Linux /etc/nixos/configuration.nix. - - Alternatively, you can change the configuration from within the container - itself by running nixos-rebuild switch inside the - container. Note that the container by default does not have a copy of the - NixOS channel, so you should run nix-channel --update - first. - - Containers can be stopped and started using nixos-container stop and nixos-container start, respectively, or -- cgit 1.4.1