Code Monkey home page Code Monkey logo

nixos-rpi-sd-image's Introduction

nixos-rpi-sd-image

A convenient way to create custom Raspberry Pi NixOS SD images.

So far this has been tested to work with Docker Desktop for Mac and also Docker on Linux.

Setup

  1. Install QEMU into the host machine:

    docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  2. Clone this repo.

  3. Configure nixos-rpi-sd-image/sd-image.nix and nixos-rpi-sd-image/configuration.nix with your own settings.

Run

  1. Use docker-compose to mount output and run the container:

    docker-compose up
  2. Check the output directory for the .img file.

SD Image Usage

  1. Burn the .img file in output to an SD card with your preferred method.

  2. Insert the SD card into the Raspberry Pi and wait for it to boot.

  3. Wait for NixOS to rebuild and switch (this may take a long time) or SSH into the Raspberry Pi, then run the following command to monitor progress:

    journalctl -f -u sd-image-init.service
  4. Enjoy!

Credit

This was possible mostly in part because of the blog posts and code of @Robertof, but also the contributors to nixos-generators and the wiki for NixOS on ARM.

NixOS on ARM > Building your own image > Compiling through QEMU

NixOS on a Raspberry Pi: creating a custom SD image with OpenSSH out of the box by @Robertof

NixOS Docker-based SD image builder

nixos-generators - one config, multiple formats

nixos-rpi-sd-image's People

Contributors

dfrankland avatar

Stargazers

Mystery avatar

Watchers

 avatar

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.