summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorErik Arvstedt <erik.arvstedt@gmail.com>2018-11-26 22:22:09 +0100
committerErik Arvstedt <erik.arvstedt@gmail.com>2018-11-26 23:06:56 +0100
commitc64a9718ce82c2579c1f707748e066bb9596d50b (patch)
tree48426b59f2d678545204b21482a7367a01809c85 /nixos
parent128a446c59872f1df38070655a903b885293b995 (diff)
downloadnixpkgs-c64a9718ce82c2579c1f707748e066bb9596d50b.tar
nixpkgs-c64a9718ce82c2579c1f707748e066bb9596d50b.tar.gz
nixpkgs-c64a9718ce82c2579c1f707748e066bb9596d50b.tar.bz2
nixpkgs-c64a9718ce82c2579c1f707748e066bb9596d50b.tar.lz
nixpkgs-c64a9718ce82c2579c1f707748e066bb9596d50b.tar.xz
nixpkgs-c64a9718ce82c2579c1f707748e066bb9596d50b.tar.zst
nixpkgs-c64a9718ce82c2579c1f707748e066bb9596d50b.zip
nixos/containers: simplify env var definition
Also clear up the misleading comment: This env var isn't
root-specific, it's needed for all users.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/virtualisation/container-config.nix8
1 files changed, 2 insertions, 6 deletions
diff --git a/nixos/modules/virtualisation/container-config.nix b/nixos/modules/virtualisation/container-config.nix
index 561db7cabcf..78c59d98a5e 100644
--- a/nixos/modules/virtualisation/container-config.nix
+++ b/nixos/modules/virtualisation/container-config.nix
@@ -22,12 +22,8 @@ with lib;
     # Not supported in systemd-nspawn containers.
     security.audit.enable = false;
 
-    # Make sure that root user in container will talk to host nix-daemon
-    environment.etc."profile".text = ''
-    export NIX_REMOTE=daemon
-    '';
-
-
+    # Use the host's nix-daemon.
+    environment.variables.NIX_REMOTE = "daemon";
 
   };