mirror of
https://github.com/samueldr/wip-pinebook-pro.git
synced 2024-11-14 06:59:43 +01:00
a217594cf3
This should let users build an SD image simply with `nix build` run from the root of the repo, or even `nix build github:samudeldr/wip-pinebook-pro'.
24 lines
610 B
Nix
24 lines
610 B
Nix
{ nixpkgs, config, pkgs, lib, ... }:
|
|
|
|
let
|
|
uboot = pkgs.uBootPinebookProExternalFirst;
|
|
in
|
|
{
|
|
imports = [
|
|
"${nixpkgs}/nixos/modules/profiles/base.nix"
|
|
"${nixpkgs}/nixos/modules/profiles/minimal.nix"
|
|
"${nixpkgs}/nixos/modules/profiles/installation-device.nix"
|
|
./nixos/sd-image-aarch64.nix
|
|
./pinebook_pro.nix
|
|
];
|
|
|
|
sdImage = {
|
|
manipulateImageCommands = ''
|
|
(PS4=" $ "; set -x
|
|
dd if=${uboot}/idbloader.img of=$img bs=512 seek=64 conv=notrunc
|
|
dd if=${uboot}/u-boot.itb of=$img bs=512 seek=16384 conv=notrunc
|
|
)
|
|
'';
|
|
compressImage = lib.mkForce false;
|
|
};
|
|
}
|