NixOS on ARM: Difference between revisions
imported>Samueldr m Phrasing→The easiest way |
imported>Mic92 build your own image |
||
| Line 223: | Line 223: | ||
* [https://cachix.org cachix] provides an arm binary cache ([https://discourse.nixos.org/t/armv7l-builds-on-cachix/788 Discourse post]: | * [https://cachix.org cachix] provides an arm binary cache ([https://discourse.nixos.org/t/armv7l-builds-on-cachix/788 Discourse post]: | ||
** https://arm.cachix.org/ - <code>arm.cachix.org-1:fGqEJIhp5zM7hxe/Dzt9l9Ene9SY27PUyx3hT9Vvei0=</code> | ** https://arm.cachix.org/ - <code>arm.cachix.org-1:fGqEJIhp5zM7hxe/Dzt9l9Ene9SY27PUyx3hT9Vvei0=</code> | ||
== Build your own image == | |||
You can customize image by using the following snippet. | |||
<syntaxHighlight lang=nix> | |||
# save as sd-image.nix somewhere | |||
{ ... }: { | |||
imports = [ | |||
<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-aarch64.nix> | |||
]; | |||
# put your own configuration here, for example ssh keys: | |||
users.extraUsers.root.openssh.authorizedKeys.keys = [ | |||
"ssh-ed25519 AAAAC3NzaC1lZDI1.... username@tld" | |||
]; | |||
} | |||
</syntaxHighlight> | |||
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 require an 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]. | |||
== Board-specific installation notes == | == Board-specific installation notes == | ||