diff options
| author | tv <tv@krebsco.de> | 2026-11-26 16:42:31 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-26 16:48:26 +0000 |
| commit | f47b06a7198932dd3ffbebd03cdadbff26a89479 (patch) | |
| tree | a792ea5f246c07acd6b0dd56bd3b3fbf94529294 | |
| parent | 4757548fc4ab2d3eda41a3b233997fc11670d587 (diff) | |
krops.nix: evaluate with the builder's system
| -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>') |
