From b1fa6b3aac4ce8225e506317119b32122cfc1edd Mon Sep 17 00:00:00 2001
From: John Ericson <John.Ericson@Obsidian.Systems>
Date: Wed, 24 Jan 2024 21:37:13 -0500
Subject: [PATCH] Use `StoreConfig::getDefaultSystemFeatures` for default
 machine config

We have to oddly make a `StoreConfig` subclass to get it, but
https://github.com/NixOS/nix/pull/9848 will fix that.

The purpose of this is to ensure that, absent an explicit config,
`localhost` includes `ca-derivations` and `recursive-nix` if those
experimental features are enabled.

Very much the complement of #1342, the previous PR.
---
 src/hydra-queue-runner/hydra-queue-runner.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/hydra-queue-runner/hydra-queue-runner.cc b/src/hydra-queue-runner/hydra-queue-runner.cc
index 5fbcb641..1cbcafea 100644
--- a/src/hydra-queue-runner/hydra-queue-runner.cc
+++ b/src/hydra-queue-runner/hydra-queue-runner.cc
@@ -15,6 +15,7 @@
 #include "state.hh"
 #include "hydra-build-result.hh"
 #include "store-api.hh"
+#include "local-store.hh"
 #include "remote-store.hh"
 
 #include "globals.hh"
@@ -226,7 +227,7 @@ void State::monitorMachinesFile()
         parseMachines("localhost " +
             (settings.thisSystem == "x86_64-linux" ? "x86_64-linux,i686-linux" : settings.thisSystem.get())
             + " - " + std::to_string(settings.maxBuildJobs) + " 1 "
-            + concatStringsSep(",", settings.systemFeatures.get()));
+            + concatStringsSep(",", (LocalStoreConfig { {} }).getDefaultSystemFeatures()));
         machinesReadyLock.unlock();
         return;
     }