about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-05-20 16:48:32 +0300
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-05-24 04:58:57 +0300
commit6f1f11af4c382c73667e522b47045beab939812b (patch)
tree871a94ab1663a11e65cef6a831051d3e358eaa51 /nixos
parent3cfb492c630ef51967f9c5066a806f318cc2b06b (diff)
downloadnixlib-6f1f11af4c382c73667e522b47045beab939812b.tar
nixlib-6f1f11af4c382c73667e522b47045beab939812b.tar.gz
nixlib-6f1f11af4c382c73667e522b47045beab939812b.tar.bz2
nixlib-6f1f11af4c382c73667e522b47045beab939812b.tar.lz
nixlib-6f1f11af4c382c73667e522b47045beab939812b.tar.xz
nixlib-6f1f11af4c382c73667e522b47045beab939812b.tar.zst
nixlib-6f1f11af4c382c73667e522b47045beab939812b.zip
nixos/programs/shell.nix: Enhance bad ownership error message
Steal this from scripts/nix-profile.sh.in in Nix to keep things more
consistent.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/programs/shell.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/programs/shell.nix b/nixos/modules/programs/shell.nix
index 579631c425cd..56fe347528bd 100644
--- a/nixos/modules/programs/shell.nix
+++ b/nixos/modules/programs/shell.nix
@@ -25,7 +25,7 @@ in
         # Set up the per-user profile.
         mkdir -m 0755 -p "$NIX_USER_PROFILE_DIR"
         if [ "$(stat --printf '%u' "$NIX_USER_PROFILE_DIR")" != "$(id -u)" ]; then
-            echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR" >&2
+            echo "WARNING: bad ownership on $NIX_USER_PROFILE_DIR, should be $(id -u)" >&2
         fi
 
         if [ -w "$HOME" ]; then
@@ -47,7 +47,7 @@ in
           NIX_USER_GCROOTS_DIR="/nix/var/nix/gcroots/per-user/$USER"
           mkdir -m 0755 -p "$NIX_USER_GCROOTS_DIR"
           if [ "$(stat --printf '%u' "$NIX_USER_GCROOTS_DIR")" != "$(id -u)" ]; then
-              echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR" >&2
+              echo "WARNING: bad ownership on $NIX_USER_GCROOTS_DIR, should be $(id -u)" >&2
           fi
 
           # Set up a default Nix expression from which to install stuff.