From b2ea614ae17905e5fa42b292d020db9af022781e Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 2 Feb 2025 12:53:59 +0100 Subject: build(build.sh): Allow passing arguments to nix --- build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 3c3d387c..0e574a3a 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,8 @@ #!/usr/bin/env sh host="${1-tiamat}" +[ "$#" -gt 0 ] && shift 1 + root="$(git rev-parse --show-toplevel)" SYSTEM_OUT="$root/result-system" @@ -19,7 +21,7 @@ check() { } build_system() { - _val="$(nix build ".#nixosConfigurations.$host.config.system.build.toplevel" --print-out-paths --no-link)" + _val="$(nix build ".#nixosConfigurations.$host.config.system.build.toplevel" --print-out-paths --no-link "$@")" exit_val="$?" if [ "$exit_val" -ne 0 ]; then @@ -30,7 +32,7 @@ build_system() { fi } -system="$(build_system)" +system="$(build_system "$@")" [ "$system" = "1" ] && exit 1 check "$SYSTEM_OUT" -- cgit 1.4.1