Skip to content

Deploying from nix-shell under root #319

Open
@danbst

Description

I was doing this:

  1. install nixos on ec2 from nixos AMI
  2. git clone nixops on ec2 machine
  3. run ./dev-shell
  4. nixops deploy
building path(s) в??/nix/store/6slz3xj7ski2jyza20m27l6dg85wyysy-system-unitsв?T
/nix/store/jm26xg0h3jcrg4bbrwiqx3jpirscdk0p-stdenv/setup: line 456: /run/user/0/nix-build-system-units.drv-0/env-vars: Permission denied
builder for в??/nix/store/sjhxwnljr0bh8rwjvqawcwypir82rqci-system-units.drvв?T failed with exit code 1
cannot build derivation в??/nix/store/gv7fsdkh6x1rmqfh1v7jhr4m8p6k7l8z-etc.drvв?T: 1 dependencies couldn't be built
cannot build derivation в??/nix/store/j1k7ggpaswv2v4kx5if8fq46kzm7rdc5-nixos-15.06pre64647.a73d25d.drvв?T: 1 dependencies couldn't be built
cannot build derivation в??/nix/store/gjk9p7hbrv95kjf9pf878sfd9j7xy9mf-nixops-machines.drvв?T: 1 dependencies couldn't be built
error: build of в??/nix/store/gjk9p7hbrv95kjf9pf878sfd9j7xy9mf-nixops-machines.drvв?T failed
error: unable to build all machine configurations

in IRC we concluded that the problem is in temp directory and solution is to

mkdir /tmp/foo
export TMPDIR=/tmp/foo

This is quite non-obvious behaviour for those, who want to hack on nixops, and when running nixops deploy without dev-shell, everything is ok.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions