1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 19:47:47 +00:00

Add trace param to build script

This commit is contained in:
RGBCube 2023-11-23 14:41:50 +03:00
parent 0b4a718c78
commit bc16e33c5d
No known key found for this signature in database

View file

@ -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"
}