Skip to content

lucasduport/nix-builder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix builder image

This image can be used to serve as a Nix remote builder. A SSH server is started automatically, and your SSH public keys can be fed in arguments.

Usage

To start a container, simply use:

docker run --rm -dp 22:22 ghcr.io/litarvan/nix-builder:2.19.2 "$(ssh-add -L)"

The first time, register the builder in your Nix configuration:

mkdir -p ~/.config/nix && cat <<EOF >> ~/.config/nix/nix.conf
builders = ssh://root@127.0.0.1 aarch64-linux
builders-use-substitutes = true
EOF

Finally, test the connection (while also registering the host key(s)):

ssh root@127.0.0.1 nix --version

About

Ready-to-use Nix builder image to build aarch64-linux images easily on MacOS

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 89.4%
  • Shell 10.6%