From 1a66b71e2dc259318620ca650e7cb9419bd1cf9d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 1 Mar 2007 15:31:05 +0000 Subject: [PATCH] * Set NIX_REMOTE when logging in through SSH. Quick hack. Should really figure out why the environment isn't initialised properly in non-interactive SSH logins. svn path=/nixos/trunk/; revision=8136 --- system/etc.nix | 1 + system/etc/profile.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/system/etc.nix b/system/etc.nix index c4f69ffd76d..4f94b904ecd 100644 --- a/system/etc.nix +++ b/system/etc.nix @@ -7,6 +7,7 @@ let envConf = pkgs.writeText "environment" " PATH=${systemPath}/bin:${systemPath}/sbin:${pkgs.openssh}/bin + NIX_REMOTE=daemon " /* ${pkgs.openssh}/bin is a hack to get remote scp to work */; in diff --git a/system/etc/profile.sh b/system/etc/profile.sh index b858f9e74b0..ae29c857294 100644 --- a/system/etc/profile.sh +++ b/system/etc/profile.sh @@ -13,6 +13,8 @@ fi if test "$USER" != root; then export NIX_REMOTE=daemon +else + export NIX_REMOTE= fi