{"action":"opened","issue":{"url":"https://api.github.com/repos/NixOS/nix/issues/670","labels_url":"https://api.github.com/repos/NixOS/nix/issues/670/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nix/issues/670/comments","events_url":"https://api.github.com/repos/NixOS/nix/issues/670/events","html_url":"https://github.com/NixOS/nix/issues/670","id":114091400,"number":670,"title":"Nix-env tries to create \"homeless-shelter\" directory in root","user":{"login":"leftaroundabout","id":1528675,"avatar_url":"https://avatars.githubusercontent.com/u/1528675?v=3","gravatar_id":"","url":"https://api.github.com/users/leftaroundabout","html_url":"https://github.com/leftaroundabout","followers_url":"https://api.github.com/users/leftaroundabout/followers","following_url":"https://api.github.com/users/leftaroundabout/following{/other_user}","gists_url":"https://api.github.com/users/leftaroundabout/gists{/gist_id}","starred_url":"https://api.github.com/users/leftaroundabout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leftaroundabout/subscriptions","organizations_url":"https://api.github.com/users/leftaroundabout/orgs","repos_url":"https://api.github.com/users/leftaroundabout/repos","events_url":"https://api.github.com/users/leftaroundabout/events{/privacy}","received_events_url":"https://api.github.com/users/leftaroundabout/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-29T16:35:41Z","updated_at":"2015-10-29T16:35:41Z","closed_at":null,"body":"Following [this guide](https://nixos.org/wiki/How_to_install_nix_in_home_%28on_another_distribution%29), I managed to install Nix in the home folder on a machine where I don't have root access. Nice. (It it require [some funny manual tweaks, mind...](https://github.com/NixOS/nix/issues/566))\r\n\r\nAfter everything was in place and `$HOME/.nix-profile/bin` in my `$PATH`, I logged in freshly to see if it works.\r\n\r\n    $ nix-env --verbose -qa git\r\n    error: creating directory ‘/homeless-shelter’: Permission denied\r\n\r\nWell, it's kind of obvious that it doesn't have permission to create a directory `/homeless-shelter`, but why does it try this? How can make `nix-env` use only user-accessible paths?"}}