forked from DGNum/snix-cache
No description
| LICENSES | ||
| nix | ||
| src | ||
| tests | ||
| .envrc | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| default.nix | ||
| lon.lock | ||
| lon.nix | ||
| patch | ||
| README.md | ||
| REUSE.toml | ||
| rustfmt.toml | ||
| shell.nix | ||
snix-cache
This is some wiring code to spawn as much narbridges you want and snix backend services composed using the store composition feature.
See e200ae53a4/machines/storage01/tvix-cache/default.nix for a usage exemple
Example config
{
config,
pkgs,
sources,
...
}:
let
host = "snix-cache.example.com";
in
{
imports = [ "${sources.snix-cache}/nix/module.nix" ];
nixpkgs.overlays = [ (import sources.snix-cache { inherit pkgs; }).overlay ];
services.snix-cache = {
enable = true;
inherit host;
caches = {
default = {
maxBodySize = "50G";
uploadPasswordFile = config.age.secrets."nginx-snix_cache_default".path;
signingPasswordFile = config.age.secrets."nginx-snix_cache_default.signing".path;
signingKeyFile = config.age.secrets."snix-cache-default_signing_key".path;
publicKey = "default.snix-cache.example.com-1:numjqGylTs8nVaEl/jQ1Hp0tA0tmosMGq3awZVkCcWM=";
};
};
};
services.nginx.virtualHosts.${host} = {
enableACME = true;
forceSSL = true;
};
}