upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-12 22:53:05 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-12 22:53:05 +0000
commitd399bd0bcfba3a3f500421a954257ada034283f8 (patch)
tree662a0ae2e053cdd6c1c7cdcb9245cc86673e5ba2
parent51751d59f30a0c0f396afd1873ece9f4f77b44de (diff)
fix(nix): convert boolean env vars to "true"/"false" strings instead of "1"/"0"
The archiveAll and archiveReadOnly options were using toString which converts booleans to "1"/"0", but the CLI expects "true"/"false" strings. This caused startup errors like: error: invalid value '1' for '--archive-all' [possible values: true, false] Changed both to use explicit if/then/else conversion to match CLI expectations.
-rw-r--r--nix/module.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nix/module.nix b/nix/module.nix
index ae67512..09c56c1 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -290,7 +290,7 @@ let
290 toString cfg.rejectedColdIndexExpirySecs; 290 toString cfg.rejectedColdIndexExpirySecs;
291 NGIT_NAUGHTY_LIST_EXPIRATION_HOURS = 291 NGIT_NAUGHTY_LIST_EXPIRATION_HOURS =
292 toString cfg.naughtyListExpirationHours; 292 toString cfg.naughtyListExpirationHours;
293 NGIT_ARCHIVE_ALL = toString cfg.archiveAll; 293 NGIT_ARCHIVE_ALL = if cfg.archiveAll then "true" else "false";
294 NGIT_ARCHIVE_WHITELIST = concatStringsSep "," cfg.archiveWhitelist; 294 NGIT_ARCHIVE_WHITELIST = concatStringsSep "," cfg.archiveWhitelist;
295 NGIT_REPOSITORY_WHITELIST = concatStringsSep "," cfg.repositoryWhitelist; 295 NGIT_REPOSITORY_WHITELIST = concatStringsSep "," cfg.repositoryWhitelist;
296 NGIT_REPOSITORY_BLACKLIST = concatStringsSep "," cfg.repositoryBlacklist; 296 NGIT_REPOSITORY_BLACKLIST = concatStringsSep "," cfg.repositoryBlacklist;
@@ -299,7 +299,7 @@ let
299 } // optionalAttrs (cfg.relayName != null) { 299 } // optionalAttrs (cfg.relayName != null) {
300 NGIT_RELAY_NAME = cfg.relayName; 300 NGIT_RELAY_NAME = cfg.relayName;
301 } // optionalAttrs (cfg.archiveReadOnly != null) { 301 } // optionalAttrs (cfg.archiveReadOnly != null) {
302 NGIT_ARCHIVE_READ_ONLY = toString cfg.archiveReadOnly; 302 NGIT_ARCHIVE_READ_ONLY = if cfg.archiveReadOnly then "true" else "false";
303 } // optionalAttrs cfg.metricsEnabled { NGIT_METRICS_ENABLED = "true"; } 303 } // optionalAttrs cfg.metricsEnabled { NGIT_METRICS_ENABLED = "true"; }
304 // optionalAttrs (cfg.syncBootstrapRelayUrl != null) { 304 // optionalAttrs (cfg.syncBootstrapRelayUrl != null) {
305 NGIT_SYNC_BOOTSTRAP_RELAY_URL = cfg.syncBootstrapRelayUrl; 305 NGIT_SYNC_BOOTSTRAP_RELAY_URL = cfg.syncBootstrapRelayUrl;