Code Monkey home page Code Monkey logo

codespaces-nix's People

Contributors

zombiezen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

codespaces-nix's Issues

Automatically install Lorri

I commonly use direnv + Lorri to provide Nix shells for my projects. I'd like to verify that lorri watch can be used without setting up a daemon or otherwise provide a convenient setup for using it.

Git not available

When using the image without any features on Codespaces, it fails with a Git not found error. This is being masked by the docker-from-docker feature, which weirdly installs Git. I suspect the not found error is because the clone is occurring as root, which won't have the Nix profile set up isn't done in a login shell.

Bad meta.outputsToInstall on second `nix-env --install`

After my dotfiles are installed (which invokes nix-env --install), any subsequent attempt to install more derivations results in an error message of:

error: this derivation has bad 'meta.outputsToInstall'

I don't have a minimal reproduction case, but noting it here until I get a handle on the problem.

Problem with mounts

Getting this log when trying to use 0.1.1-alpha1:

2022-11-12 19:37:04.509Z: docker: Error response from daemon: invalid mount config for type "tmpfs": field Source must not be specified.
2022-11-12 19:37:04.509Z: See 'docker run --help'.
2022-11-12 19:37:04.510Z: Stop (37 ms): Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,src=/var/lib/docker/codespacemount/workspace,dst=/workspaces --mount type=tmpfs,src=undefined,dst=/run --mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker-host.sock --mount source=/root/.codespaces/shared,target=/workspaces/.codespaces/shared,type=bind --mount source=/var/lib/docker/codespacemount/.persistedshare,target=/workspaces/.codespaces/.persistedshare,type=bind --mount source=/.codespaces/agent/mount,target=/.codespaces/bin,type=bind --mount source=/mnt/containerTmp,target=/tmp,type=bind --mount type=bind,src=/.codespaces/agent/mount/cache,dst=/vscode -l Type=codespaces -e CODESPACES=true -e ContainerVersion=12 -e RepositoryName=codespaces-nix --label ContainerVersion=12 --hostname codespaces-fe1f4b --add-host codespaces-fe1f4b:127.0.0.1 --cap-add sys_nice --network host --entrypoint /bin/sh vsc-codespaces-nix-644884b3d78046d30a6c40bd1e516587-features -c echo Container started

Ownership/permissions incorrect

While in development and strictly in Docker, the Nix installation appears correct, but I've run into the ACL issue again. This time, I'm now able to isolate it the Codespaces /tmp mount: it's not anything about how the image is built.

$ getfacl /tmp
getfacl: Removing leading '/' from absolute path names
# file: tmp
# owner: root
# group: root
# flags: --t
user::rwx
group::r-x
other::rwx
default:user::rwx
default:group::r-x
default:other::rw-

The reproduction case:

{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/d8f2c4d846a2e65ad3f5a5e842b672f0b81588a2.tar.gz") {}
}:

pkgs.writeText "foo.txt" ''
  Hello, World!
''

This ends up resulting in:

$ NIX_REMOTE=daemon nix-build ./foosrc -A hiFile                        
this derivation will be built:
  /nix/store/8xs8zafsi7vf45c2kd13w36jlivqak0b-foo.txt.drv
building '/nix/store/8xs8zafsi7vf45c2kd13w36jlivqak0b-foo.txt.drv'...
error: suspicious ownership or permission on '/nix/store/yb1rykk88bx9psfbwdk1ysh3m905dc1n-foo.txt' for output 'out'; rejecting this build output
$ ls -l /nix/store/yb1rykk88bx9psfbwdk1ysh3m905dc1n-foo.txt             
-rw-r--rw- 1 nixbld1 nixbld 14 Nov 18 15:56 /nix/store/yb1rykk88bx9psfbwdk1ysh3m905dc1n-foo.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.