From d399bd0bcfba3a3f500421a954257ada034283f8 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 12 Jan 2026 22:53:05 +0000 Subject: 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. --- nix/module.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nix') 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 toString cfg.rejectedColdIndexExpirySecs; NGIT_NAUGHTY_LIST_EXPIRATION_HOURS = toString cfg.naughtyListExpirationHours; - NGIT_ARCHIVE_ALL = toString cfg.archiveAll; + NGIT_ARCHIVE_ALL = if cfg.archiveAll then "true" else "false"; NGIT_ARCHIVE_WHITELIST = concatStringsSep "," cfg.archiveWhitelist; NGIT_REPOSITORY_WHITELIST = concatStringsSep "," cfg.repositoryWhitelist; NGIT_REPOSITORY_BLACKLIST = concatStringsSep "," cfg.repositoryBlacklist; @@ -299,7 +299,7 @@ let } // optionalAttrs (cfg.relayName != null) { NGIT_RELAY_NAME = cfg.relayName; } // optionalAttrs (cfg.archiveReadOnly != null) { - NGIT_ARCHIVE_READ_ONLY = toString cfg.archiveReadOnly; + NGIT_ARCHIVE_READ_ONLY = if cfg.archiveReadOnly then "true" else "false"; } // optionalAttrs cfg.metricsEnabled { NGIT_METRICS_ENABLED = "true"; } // optionalAttrs (cfg.syncBootstrapRelayUrl != null) { NGIT_SYNC_BOOTSTRAP_RELAY_URL = cfg.syncBootstrapRelayUrl; -- cgit v1.2.3