NixOS on ARM: Difference between revisions
imported>Pickfire Add note on where flake file should be |
imported>Pickfire m Move flake.nix instructions below normal build |
||
Line 366: | Line 366: | ||
</syntaxHighlight> | </syntaxHighlight> | ||
if you use the experimental flake, can put the following in <code>flake.nix</code>, <code>git add flake.nix</code> and build with <code>nix build .#images.rpi2</code>: | Then build with: | ||
<syntaxHighlight lang=nix> | |||
$ nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage -I nixos-config=./sd-image.nix | |||
</syntaxHighlight> | |||
Note that this requires a machine with aarch64. You can however also build it from your laptop using an aarch64 remote builder as described in [[Distributed build]] or ask for access on the [https://github.com/nix-community/aarch64-build-box community aarch64 builder]. | |||
if you use the experimental flake, instead of doing the above stuff, can put the following lines in <code>flake.nix</code>, <code>git add flake.nix</code> and build with <code>nix build .#images.rpi2</code>: | |||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
Line 387: | Line 395: | ||
}; | }; | ||
} | } | ||
</syntaxHighlight> | </syntaxHighlight> | ||
=== Cross-compiling === | === Cross-compiling === |