Skip to content

Commit

Permalink
Add --show-trace flag, to show nix build traces
Browse files Browse the repository at this point in the history
  • Loading branch information
Qubasa committed Jan 27, 2025
1 parent 97b45ac commit 288cbf0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ flakeAttr=""
kexecUrl=""
kexecExtraFlags=""
enableDebug=""
nixBuildFlags=""
diskoScript=""
diskoMode="disko"
nixosSystem=""
Expand Down Expand Up @@ -106,6 +107,8 @@ Options:
disable passing --substitute-on-destination to nix-copy
* --debug
enable debug output
* --show-trace
show nix build traces
* --option <key> <value>
nix option to pass to every nix related command
* --from <store-uri>
Expand Down Expand Up @@ -212,6 +215,9 @@ parseArgs() {
--copy-host-keys)
copyHostKeys=y
;;
--show-trace)
nixBuildFlags+=" --show-trace"
;;
--debug)
enableDebug="-x"
printBuildLogs=y
Expand Down Expand Up @@ -353,6 +359,7 @@ nixBuild() {
NIX_SSHOPTS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $sshKeyDir/nixos-anywhere ${sshArgs[*]}" nix build \
--print-out-paths \
--no-link \
$nixBuildFlags \
"${nixOptions[@]}" \
"$@"
}
Expand Down Expand Up @@ -380,6 +387,7 @@ runVmTest() {
--print-out-paths \
--no-link \
-L \
$nixBuildFlags \
"${nixOptions[@]}" \
"${flake}#${flakeAttr}.system.build.installTest"
}
Expand Down

0 comments on commit 288cbf0

Please sign in to comment.