about summary refs log tree commit diff stats
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh6
1 files 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"