Skip to content

Litarvan/nix-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nix Builder Image

This image serves as a Nix remote builder with an automatically started SSH server. You can provide your SSH public keys as arguments.

Usage

  1. Add SSH Key: Ensure your SSH key is added using ssh-add. Verify that ssh-add -L lists your public keys.

  2. Start Container: Run the container with:

    docker run --rm -dp 22:22 ghcr.io/litarvan/nix-builder:2.27.1 "$(ssh-add -L)"
  3. Copy SSH Keys: Make your SSH keys accessible to the root user:

    sudo cp -r ~/.ssh /var/root
  4. Register Builder: Add the builder to 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
  5. Test Connection: Verify the setup by testing the SSH connection:

    sudo ssh root@127.0.0.1 nix --version
  6. Trusted User: Ensure you are a trusted user in your Nix installation. Add your username to ~/.config/nix/nix.conf:

    extra-trusted-users = <your-username>

This setup enables you to use the Nix remote builder effectively.

About

Ready-to-use Nix builder image

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •