Unverified Commit 79c9c639 authored by Wael Nasreddine's avatar Wael Nasreddine Committed by GitHub
Browse files

nixos/ncps: support sign narinfo option (#428138)

parents 8c40e16b 3bd3493d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ let
      "--cache-lru-schedule-timezone='${cfg.cache.lru.scheduleTimeZone}'"
    ])
    ++ (lib.optional (cfg.cache.secretKeyPath != null) "--cache-secret-key-path='%d/secretKey'")
    ++ (lib.optional (!cfg.cache.signNarinfo) "--cache-sign-narinfo='false'")
    ++ (lib.forEach cfg.upstream.caches (url: "--upstream-cache='${url}'"))
    ++ (lib.forEach cfg.upstream.publicKeys (pk: "--upstream-public-key='${pk}'"))
    ++ (lib.optional (cfg.netrcFile != null) "--netrc-file='${cfg.netrcFile}'")
@@ -180,6 +181,15 @@ in
            The path to the temporary directory that is used by the cache to download NAR files
          '';
        };

        signNarinfo = lib.mkOption {
          type = lib.types.bool;
          default = true;
          example = "false";
          description = ''
            Whether to sign narInfo files or passthru as-is from upstream
          '';
        };
      };

      server = {