feat: Add upstream cache option

This commit is contained in:
sinavir 2024-07-18 22:21:03 +02:00
parent 9e967da0a8
commit c1e3a00f2a

View file

@ -57,11 +57,16 @@ in
default = name;
defaultText = lib.literalMD "Defaults to attribute name in services.tvix-binary-cache.caches";
};
remote-path-info-service-addr = lib.mkOption {
type = with lib.types; nullOr str;
description = "Upstream cache to substitute from if nothing in ";
example = "nix+https://cache.nixos.org?trusted-public-keys=cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=";
default = null;
};
};
}
)
);
};
};
};
@ -114,6 +119,9 @@ in
BLOB_SERVICE_ADDR = "grpc+unix://%t/tvix-castore/socket";
DIRECTORY_SERVICE_ADDR = "grpc+unix://%t/tvix-castore/socket";
PATH_INFO_SERVICE_ADDR = "sled://%S/${stateDir}/pathinfo.sled";
REMOTE_PATH_INFO_SERVICE_ADDR = lib.mkIf (
cfg.remote-path-info-service-addr != null
) cfg.remote-path-info-service-addr;
};
serviceConfig = {
ExecStart = "${pkgs.tvix-store}/bin/tvix-store --otlp=false daemon --listen-address=\"%t/${stateDir}/socket\"";