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.
This commit is contained in:
John Ericson 2024-01-24 21:37:13 -05:00
parent f6a2b7562a
commit b1fa6b3aac

View file

@ -15,6 +15,7 @@
#include "state.hh" #include "state.hh"
#include "hydra-build-result.hh" #include "hydra-build-result.hh"
#include "store-api.hh" #include "store-api.hh"
#include "local-store.hh"
#include "remote-store.hh" #include "remote-store.hh"
#include "globals.hh" #include "globals.hh"
@ -226,7 +227,7 @@ void State::monitorMachinesFile()
parseMachines("localhost " + parseMachines("localhost " +
(settings.thisSystem == "x86_64-linux" ? "x86_64-linux,i686-linux" : settings.thisSystem.get()) (settings.thisSystem == "x86_64-linux" ? "x86_64-linux,i686-linux" : settings.thisSystem.get())
+ " - " + std::to_string(settings.maxBuildJobs) + " 1 " + " - " + std::to_string(settings.maxBuildJobs) + " 1 "
+ concatStringsSep(",", settings.systemFeatures.get())); + concatStringsSep(",", (LocalStoreConfig { {} }).getDefaultSystemFeatures()));
machinesReadyLock.unlock(); machinesReadyLock.unlock();
return; return;
} }