summaryrefslogtreecommitdiff
path: root/util/liveiso/nixos/build.sh
diff options
context:
space:
mode:
authorFelix Singer <felix.singer@secunet.com>2023-03-13 14:03:45 +0100
committerFelix Singer <felixsinger@posteo.net>2023-03-17 19:27:31 +0000
commit0e2fc554a778e2a47a9ad906a56159055c7187d1 (patch)
tree8484f0f782347c14c32dc4b535fa8bb1cc32ddef /util/liveiso/nixos/build.sh
parentd054bbd4f1ba1675486df38afdc186d9f31760f1 (diff)
util/liveiso: Move NixOS configs to subdirectory
Move the NixOS configuration into a subdirectory so that configurations for other distros can be added as well. Change-Id: I0462c1a6541878c973be4302c5c5e9e9bfaed2a6 Signed-off-by: Felix Singer <felix.singer@secunet.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73684 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'util/liveiso/nixos/build.sh')
-rwxr-xr-xutil/liveiso/nixos/build.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/util/liveiso/nixos/build.sh b/util/liveiso/nixos/build.sh
new file mode 100755
index 0000000000..e2e1d65672
--- /dev/null
+++ b/util/liveiso/nixos/build.sh
@@ -0,0 +1,14 @@
+#!/usr/bin/env sh
+
+config=$1
+
+if [ -z "$config" ] || [ ! -f "$config" ]; then
+ echo "Usage: $0 <config.nix>"
+ echo "No config given. Exiting."
+ exit 1
+fi
+
+nix-build '<nixpkgs/nixos>' \
+ -A config.system.build.isoImage \
+ -I nixos-config=$config \
+ -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-22.11.tar.gz