{"action":"opened","issue":{"url":"https://api.github.com/repos/datakurre/setup.nix/issues/11","repository_url":"https://api.github.com/repos/datakurre/setup.nix","labels_url":"https://api.github.com/repos/datakurre/setup.nix/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/datakurre/setup.nix/issues/11/comments","events_url":"https://api.github.com/repos/datakurre/setup.nix/issues/11/events","html_url":"https://github.com/datakurre/setup.nix/issues/11","id":364610430,"node_id":"MDU6SXNzdWUzNjQ2MTA0MzA=","number":11,"title":"users issues","user":{"login":"samrose","id":115821,"node_id":"MDQ6VXNlcjExNTgyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/115821?v=4","gravatar_id":"","url":"https://api.github.com/users/samrose","html_url":"https://github.com/samrose","followers_url":"https://api.github.com/users/samrose/followers","following_url":"https://api.github.com/users/samrose/following{/other_user}","gists_url":"https://api.github.com/users/samrose/gists{/gist_id}","starred_url":"https://api.github.com/users/samrose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samrose/subscriptions","organizations_url":"https://api.github.com/users/samrose/orgs","repos_url":"https://api.github.com/users/samrose/repos","events_url":"https://api.github.com/users/samrose/events{/privacy}","received_events_url":"https://api.github.com/users/samrose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-27T18:58:31Z","updated_at":"2018-09-27T18:58:31Z","closed_at":null,"author_association":"NONE","body":"Strange user behavior:\r\n\r\nWhen running make nix-build as nixos uid 1000:\r\n\r\n```\r\nmake nix-build\r\nnix-shell -p libffi --run 'nix-shell setup.nix -A pip2nix \\\r\n  --run \"pip2nix generate -r requirements.txt --output=requirements.nix\"'\r\n/nix/store/3ch9lc8by88b2xx16cnyx5lrdl9lfxc2-stdenv/setup: line 756: /run/user/1001/env-vars: Permission denied\r\nerror: creating directory '/run/user/1001/nix-shell-11634-0': Permission denied\r\nmake: *** [Makefile:24: requirements.nix] Error 1\r\n```\r\n\r\nwhich corresponds to this function in the nixos source code:\r\n\r\nhttps://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L771\r\n\r\n```\r\ndumpVars() {\r\n    if [ \"${noDumpEnvVars:-0}\" != 1 ]; then\r\n        export > \"$NIX_BUILD_TOP/env-vars\" || true\r\n    fi\r\n}\r\n```\r\n\r\nit seems nixos does not have `\"$NIX_BUILD_TOP\"` env var set, and so is defaulting to ` /run/user/1001/` \r\n\r\nis there a way to set this per user in nixos?\r\n\r\nthanks!"}}
{"actor":{"display_login":"samrose"}}