From bc16e33c5d00691ce4e31c9ac4bf669c5e4191d4 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Thu, 23 Nov 2023 14:41:50 +0300 Subject: [PATCH] Add trace param to build script --- rebuild.nu | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rebuild.nu b/rebuild.nu index 5c3013d..08b6117 100755 --- a/rebuild.nu +++ b/rebuild.nu @@ -1,7 +1,8 @@ #!/usr/bin/env nu def main [ - machine: string = "" # The machine to build. + machine: string = "" # The machine to build. + --no-trace: bool = false # Wheter to not show the full trace. ] { mut machine_ = $machine @@ -24,5 +25,5 @@ def main [ } sudo --validate - sh -c $"sudo nixos-rebuild switch --log-format internal-json --impure --flake ('.#' + $machine) |& nom --json" + sh -c $"sudo nixos-rebuild switch (if not $no_trace { --show-trace } else {}) --log-format internal-json --impure --flake ('.#' + $machine) |& nom --json" }