NixOS on ARM/Building Images: Difference between revisions
mNo edit summary |
m Add plan and update with alternatives section |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{outdated|This page needs a cleanup; it was migrated from an organically evolving article from about three wikis ago. The information may still be accurate though.}} | {{ARM/breadcrumb}} | ||
{{outdated|This page needs a cleanup; it was migrated from an organically evolving article from about three wikis ago. The information may still be accurate though.}}<!-- | |||
Plan | |||
Make it obvious that this is not a public-facing API. Though the scheme is used for building e.g. armv7l and armv6l images. | |||
Building complex images from the SD image tooling is not supported, and will not be. | |||
--> | |||
== Build your own image natively == | == Build your own image natively == | ||
Line 96: | Line 104: | ||
It is also possible to build nixos images through full emulation using QEMU/kvm but will be way slower than native and binfmt QEMU. | It is also possible to build nixos images through full emulation using QEMU/kvm but will be way slower than native and binfmt QEMU. | ||
== | == Alternatives to building custom images == | ||
=== Stock NixOS installer image with custom U-Boot === | |||
The [https://github.com/Mic92/nixos-aarch64-images Mic92/nixos-aarch64-images] repository provides a mechanism to modify the official NixOS installer to embed the board-specific U-Boot firmware required for different boards. This method does not require QEMU or native ARM builds since the existing Hydra-built U-Boot binaries are used. | The [https://github.com/Mic92/nixos-aarch64-images Mic92/nixos-aarch64-images] repository provides a mechanism to modify the official NixOS installer to embed the board-specific U-Boot firmware required for different boards. This method does not require QEMU or native ARM builds since the existing Hydra-built U-Boot binaries are used. | ||
=== Editing the image manually === | |||
For some simple operations, like adding an SSH public key, the expected usage for new users is to manually edit the image, add the proper directory and <tt>authorized_keys</tt> file, with proper modes. | |||
<syntaxhighlight lang="console"> | |||
$ namei -l /home/nixos/.ssh/authorized_keys | |||
f: /home/nixos/.ssh/authorized_keys | |||
drwxr-xr-x root root / | |||
drwxr-xr-x root root home | |||
drwx------ nixos users nixos | |||
drwx------ nixos users .ssh | |||
-rw------- nixos users authorized_keys | |||
</syntaxhighlight> |