1
0
Fork 0
mirror of https://github.com/samueldr/wip-pinebook-pro.git synced 2024-11-27 05:19:44 +01:00

Add a way to build the UEFI iso

This commit is contained in:
Samuel Dionne-Riel 2020-07-28 18:25:48 -04:00
parent 39788d0c83
commit f0c875d646
2 changed files with 28 additions and 0 deletions

16
build-iso.sh Executable file
View file

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
set -u
PS4=" $ "
# Ugh, I would have liked to do it through a simpler `nix-build`, but as this
# needs to set `NIX_PATH` for use of `<nixpkgs/*>` imports, this is the better
# way to go.
set -x
exec env -i \
NIXPKGS_ALLOW_UNFREE=1 \
NIX_PATH="nixpkgs=channel:nixos-unstable" \
"$(command -v nix-build)" \
iso.nix -A config.system.build.isoImage "$@"

12
iso.nix Normal file
View file

@ -0,0 +1,12 @@
import <nixpkgs/nixos> {
configuration = {
imports = [
(
if builtins.currentSystem == "aarch64-linux"
then builtins.toPath (./. + "/configuration.nix")
else builtins.toPath (./. + "/with-cross.nix")
)
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
];
};
}