Skip to content
Snippets Groups Projects
Commit 7265988e authored by Jens Nolte's avatar Jens Nolte
Browse files

Configure '--log-format bar-with-logs' for deploy script

parent 54280153
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,7 @@ fi ...@@ -67,6 +67,7 @@ fi
operation=$original_operation operation=$original_operation
set_profile="" set_profile=""
reboot="" reboot=""
readonly common_nix_flags=(--log-format bar-with-logs)
if [[ "$operation" = "switch" || "$operation" = "boot" ]] if [[ "$operation" = "switch" || "$operation" = "boot" ]]
then then
...@@ -96,7 +97,7 @@ fi ...@@ -96,7 +97,7 @@ fi
if [[ "$operation" = "iso" ]] if [[ "$operation" = "iso" ]]
then then
print_info "Building iso image" print_info "Building iso image"
readonly nixos_iso_path=$(nix build --no-link --json "path:$MACHINES_PATH#nixosConfigurations.$hostname.config.system.build.iso" | jq --raw-output ".[0].outputs.out") readonly nixos_iso_path=$(nix build $common_nix_flags --no-link --json "path:$MACHINES_PATH#isos.$hostname" | jq --raw-output ".[0].outputs.out")
print_info "Iso generated" print_info "Iso generated"
print $nixos_iso_path print $nixos_iso_path
...@@ -105,7 +106,7 @@ fi ...@@ -105,7 +106,7 @@ fi
print_info "Evaluating target system configuration" print_info "Evaluating target system configuration"
readonly system_installable="path:$MACHINES_PATH#nixosConfigurations.$hostname.config.system.build.toplevel" readonly system_installable="path:$MACHINES_PATH#nixosConfigurations.$hostname.config.system.build.toplevel"
readonly nixos_config_path=$(nix path-info --json "$system_installable" | jq --raw-output ".[0].path") readonly nixos_config_path=$(nix path-info $common_nix_flags --json "$system_installable" | jq --raw-output ".[0].path")
print >&2 "$nixos_config_path" print >&2 "$nixos_config_path"
...@@ -115,7 +116,7 @@ then ...@@ -115,7 +116,7 @@ then
# local deploy # local deploy
print_info "Building target system configuration" print_info "Building target system configuration"
nix build --no-link "$system_installable" nix build $common_nix_flags --no-link "$system_installable"
if [[ "$operation" = "build" ]] if [[ "$operation" = "build" ]]
then then
...@@ -138,7 +139,7 @@ then ...@@ -138,7 +139,7 @@ then
else else
# remote deploy # remote deploy
nix copy --substitute-on-destination --to "ssh://root@$via_hostname" "$system_installable" nix copy $common_nix_flags --substitute-on-destination --to "ssh://root@$via_hostname" "$system_installable"
# The manual way to activate a system derivation # The manual way to activate a system derivation
if [[ -n "$set_profile" ]] if [[ -n "$set_profile" ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment