mirror of
https://relay.ngit.dev/npub15qydau2hjma6ngxkl2cyar74wzyjshvl65za5k5rl69264ar2exs5cyejr/ngit-grasp.git
synced 2026-10-05 23:18:24 +00:00
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.
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user