Sign inSign up

haskelious/nix-env

By haskelious

Updated over 1 year ago

Barebones nix image that provides nix commands in a user environment.

Image
Developer tools
Operating systems
0

308

haskelious/nix-env repository overview

Overview

This barebones nix image includes the core nix commands. This allows any package to be installed through nix-env or other nix commands.

Development environment

For example you can set up a development environment by installing development tools (python, rust, go, ...) and code-server. Start the container by mapping the port:

docker run -ti -p 8080:8080 haskelious/nix-env:latest

Inside the container, set up a development environment with:

nix-shell /envs/rust.nix

Take a note of the password that is displayed on the docker session console. Open https://localhost:8080

Folder persistence

You can set persistence of the /home/nix folder by using an extended command such as

docker run -ti -p 8080:8080 -v /home/your_user:/home/nix --userns keep-id:uid=1000,gid=100 haskelious/nix-env:latest 

Package installation

Within the container, you can install any package from nixpkgs, for example the hello package, by using a command similar to

nix-env -f '<nixpkgs>' -iA hello

Enable package only within a shell session

In order to enter a shell with commands available for you to use within this shell session, for example a python interpreter, use

nix-shell -p python3

Tag summary

Content type

Image

Digest

sha256:a8260ef43

Size

39 MB

Last updated

over 1 year ago

docker pull haskelious/nix-env