[raspberry] add base image
i currently try building it and then check if it works
This commit is contained in:
16
README.md
16
README.md
@@ -53,6 +53,22 @@ to build a configuration run the following command (replace ```<hostname>``` wit
|
||||
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel
|
||||
```
|
||||
|
||||
### building raspberry image
|
||||
|
||||
for the raspberry it is possible to build the whole configuration as an sd-card image which then can be flashed directly. more information about building arm on nixos can be found [here](https://nixos.wiki/wiki/NixOS_on_ARM).
|
||||
|
||||
to be able to build the image you need to enable qemu emulation on the machine you are building with. therefore it is necessary to add the following to your configuration.nix:
|
||||
|
||||
``` nix
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
```
|
||||
|
||||
then you can build the image with:
|
||||
|
||||
``` shell
|
||||
nix build .#nixosConfigurations.rpi1_base_image.config.system.build.sdImage
|
||||
```
|
||||
|
||||
### run a configuration as vm
|
||||
|
||||
to run a vm we have to build it first using the following command (replace ```<hostname>``` with the actual hostname):
|
||||
|
||||
Reference in New Issue
Block a user