diff --git a/build-iso.sh b/build-iso.sh new file mode 100755 index 0000000..e679ec4 --- /dev/null +++ b/build-iso.sh @@ -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 `` 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 "$@" diff --git a/iso.nix b/iso.nix new file mode 100644 index 0000000..dc2861e --- /dev/null +++ b/iso.nix @@ -0,0 +1,12 @@ +import { + configuration = { + imports = [ + ( + if builtins.currentSystem == "aarch64-linux" + then builtins.toPath (./. + "/configuration.nix") + else builtins.toPath (./. + "/with-cross.nix") + ) + + ]; + }; + }