diff options
| -rw-r--r-- | krops.nix | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -269,9 +269,10 @@ rec { # # Choose the first builder that answers, and note its state. # - builder_probe='printf "%s %s %s %s\n" "$(cut -d" " -f1 /proc/loadavg)" "$(nproc)" \ + builder_probe='printf "%s %s %s %s %s\n" "$(cut -d" " -f1 /proc/loadavg)" "$(nproc)" \ "$(awk "/^MemAvailable:/{print \$2*1024}" /proc/meminfo)" \ - "$(df -B1 --output=avail /nix | tail -n 1)"' + "$(df -B1 --output=avail /nix | tail -n 1)" \ + "$(nix-instantiate --eval --json -E builtins.currentSystem | tr -d \")"' builder= ${lib.concatMapStrings (b: /* sh */ '' if test -z "$builder"; then @@ -294,6 +295,7 @@ rec { fi set -- $builder_state builder_load=$1 builder_cpus=$2 builder_mem=$3 builder_disk=$4 + builder_system=$5 # # Evaluate here, keeping the derivation for diff. @@ -302,6 +304,7 @@ rec { drv=$(nix-instantiate \ --show-trace \ --add-root "$host_cache"/roots/"$name".drv \ + --argstr buildSystem "$builder_system" \ --argstr secretDirectory ${q "${target'.path}/secrets"} \ --attr nixosConfigurations."$name".config.system.build.toplevel \ '<hrm/legacy.nix>') |
