From fc6772a7ddeafc626490914fa5309eef627f166a Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 15 Jun 2026 11:36:31 -0400 Subject: [PATCH] main: Run registerGlobalConfig before loading config This is a bit of a trip. Commit 63b0a01d751689b310251c6b5a8c65f40630573a moved config initialization out of static initializers. In doing so, an oversight was made with the new `GlobalConfig::registerGlobalConfig` calls. Previously all global configuration would be handled well before `loadConfFile` was called. The change placed `registerGlobalConfig` in `main` *after* `initNix`. The `initNix` function is what calls `initLibStore`, which in turn callse `loadConfFile`. So, in effect, the configuration for `daemonAuthorizationSettings` and `nixDevelopSettings` are not actually loaded. Change-Id: I10dba2c98e032f910942ee0e0ca6bb39ef60edc2 --- lix/nix/main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lix/nix/main.cc b/lix/nix/main.cc index 5e23f9b2a..1cdfcf2e2 100644 --- a/lix/nix/main.cc +++ b/lix/nix/main.cc @@ -458,12 +458,12 @@ int mainWrapped(AsyncIoRoot & aio, int argc, char ** argv) return 0; } - initNix(); - initLibExpr(); - GlobalConfig::registerGlobalConfig(daemonAuthorizationSettings); GlobalConfig::registerGlobalConfig(nixDevelopSettings); + initNix(); + initLibExpr(); + #if __linux__ if (getuid() == 0) { try {