From 475ee4548dca6a67709ef582f7bf4e309d48160e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 22 Aug 2007 14:58:51 +0000 Subject: [PATCH] * Create /nix/var/nix/gcroots/per-user. svn path=/nixos/trunk/; revision=9189 --- etc/profile.sh | 8 ++++++++ system/activate-configuration.sh | 1 + 2 files changed, 9 insertions(+) diff --git a/etc/profile.sh b/etc/profile.sh index b6ba962efe63..81ce4693bee4 100644 --- a/etc/profile.sh +++ b/etc/profile.sh @@ -53,6 +53,14 @@ done export PATH=$HOME/bin:$PATH +# Create the per-user garbage collector roots directory. +NIX_USER_GCROOTS_DIR=/nix/var/nix/gcroots/per-user/$USER +mkdir -m 0755 -p $NIX_USER_GCROOTS_DIR +if test "$(stat --printf '%u' $NIX_USER_GCROOTS_DIR)" != "$(id -u)"; then + echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR" >&2 +fi + + # Set up a default Nix expression from which to install stuff. if ! test -L $HOME/.nix-defexpr; then echo "creating $HOME/.nix-defexpr" >&2 diff --git a/system/activate-configuration.sh b/system/activate-configuration.sh index 917d0b44b0b8..5474dd905cba 100644 --- a/system/activate-configuration.sh +++ b/system/activate-configuration.sh @@ -117,6 +117,7 @@ fi # Nix initialisation. mkdir -m 0755 -p /nix/var/nix/db mkdir -m 0755 -p /nix/var/nix/gcroots +mkdir -m 1777 -p /nix/var/nix/gcroots/per-user mkdir -m 0755 -p /nix/var/nix/temproots mkdir -m 0755 -p /nix/var/nix/profiles mkdir -m 1777 -p /nix/var/nix/profiles/per-user