Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewcroughan/nixblitz
NixBlitz - Using Nix to implement RaspiBlitz with NixOS as the base
https://github.com/matthewcroughan/nixblitz
bitcoin nix nixos
Last synced: 3 months ago
JSON representation
NixBlitz - Using Nix to implement RaspiBlitz with NixOS as the base
- Host: GitHub
- URL: https://github.com/matthewcroughan/nixblitz
- Owner: MatthewCroughan
- Created: 2022-07-14T04:23:42.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-15T08:20:30.000Z (over 2 years ago)
- Last Synced: 2024-05-01T19:14:54.030Z (9 months ago)
- Topics: bitcoin, nix, nixos
- Language: Nix
- Homepage:
- Size: 8.79 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### On x86_64-linux, NixOS
If you're running NixOS and want to build the Raspberry Pi 4 Image, you'll need to
emulate an arm64 machine by adding the following to your NixOS configuration.```
{
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
}
```Then you will be able to run `nix build .#images.pi` and get a result you can
flash to an SD Card and boot.### On x86_64-linux non NixOS
If you are not running NixOS, you will have to follow complicated guides such as
the following for your distribution of choice, to enable binfmt for your
distribution:- https://wiki.debian.org/QemuUserEmulation
Then you will be able to run `nix build .#images.pi` in the same way and get a
result you can flahs to an SD Card and boot.### On aarch64-linux any distribution
If you are actually running `nix` on a Pi, you can just `nix build .#images.pi`
and no binfmt stuff is necessary.### What is binfmt and why is it needed?
To avoid the need to cross-compile anything, and make use of cache.nixos.org,
`nix build .#images.pi` will actually spin up QEMU and emulate an arm64 machine
for every package/derivation that needs to be compiled. Binfmt is a kernel
feature that will transparently spin up a QEMU VM whenever any program tries to
spawn a process for a foreign architecture.### Will there be a cross-compilation option?
Yes, soon. But there are some quirks with Python cross-compilation that need to
be worked out first.