make attic better
This commit is contained in:
parent
131b4b2614
commit
f5096f3917
6 changed files with 28 additions and 22 deletions
|
@ -104,7 +104,6 @@
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://cache.cything.io/central"
|
|
||||||
"https://niri.cachix.org"
|
"https://niri.cachix.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://cache.garnix.io"
|
"https://cache.garnix.io"
|
||||||
|
@ -112,7 +111,6 @@
|
||||||
"https://aseipp-nix-cache.global.ssl.fastly.net"
|
"https://aseipp-nix-cache.global.ssl.fastly.net"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
|
|
||||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
|
|
@ -7,32 +7,26 @@
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
listen = "[::]:8090";
|
listen = "[::]:8090";
|
||||||
api-endpoint = "https://cache.cything.io/";
|
api-endpoint = "https://cache.cy7.sh/";
|
||||||
allowed-hosts = [ "cache.cything.io" ];
|
allowed-hosts = [ "cache.cy7.sh" ];
|
||||||
require-proof-of-possession = false;
|
require-proof-of-possession = false;
|
||||||
compression.type = "zstd";
|
compression.type = "zstd";
|
||||||
database.url = "postgresql:///atticd?host=/run/postgresql";
|
database.url = "postgresql:///atticd?host=/run/postgresql";
|
||||||
|
|
||||||
storage = {
|
storage = {
|
||||||
type = "local";
|
type = "s3";
|
||||||
path = "/mnt/attic";
|
region = "auto";
|
||||||
|
bucket = "attic";
|
||||||
|
endpoint = "https://e3e97aac307d106a7becea43cef8fcbd.r2.cloudflarestorage.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
garbage-collection = {
|
garbage-collection = {
|
||||||
default-retention-period = "3 months";
|
default-retention-period = "2 weeks";
|
||||||
};
|
|
||||||
|
|
||||||
chunking = {
|
|
||||||
nar-size-threshold = 0; # disables chunking
|
|
||||||
min-size = 0;
|
|
||||||
avg-size = 0;
|
|
||||||
max-size = 0;
|
|
||||||
concurrent-chunk-uploads = 32;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.caddy.virtualHosts."cache.cything.io".extraConfig = ''
|
services.caddy.virtualHosts."cache.cy7.sh".extraConfig = ''
|
||||||
import common
|
import common
|
||||||
reverse_proxy localhost:8090
|
reverse_proxy localhost:8090
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
"@wheel"
|
"@wheel"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"central:uWhjva6m6dhC2hqNisjn2hXGvdGBs19vPkA1dPEuwFg="
|
|
||||||
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
@ -18,7 +17,6 @@
|
||||||
];
|
];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://aseipp-nix-cache.global.ssl.fastly.net"
|
"https://aseipp-nix-cache.global.ssl.fastly.net"
|
||||||
"https://cache.cything.io/central"
|
|
||||||
"https://niri.cachix.org"
|
"https://niri.cachix.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://cache.garnix.io"
|
"https://cache.garnix.io"
|
||||||
|
|
13
overlay/attic/concurrent-32.patch
Normal file
13
overlay/attic/concurrent-32.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/server/src/config.rs b/server/src/config.rs
|
||||||
|
index 4412cbf..6dd483a 100644
|
||||||
|
--- a/server/src/config.rs
|
||||||
|
+++ b/server/src/config.rs
|
||||||
|
@@ -565,7 +565,7 @@ fn default_default_retention_period() -> Duration {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn default_concurrent_chunk_uploads() -> usize {
|
||||||
|
- 10
|
||||||
|
+ 32
|
||||||
|
}
|
||||||
|
|
||||||
|
fn load_config_from_path(path: &Path) -> Result<Config> {
|
|
@ -16,6 +16,9 @@ final: prev: {
|
||||||
cargoLock = null;
|
cargoLock = null;
|
||||||
cargoHash = "sha256-AbpWnYfBMrR6oOfy2LkQvIPYsClCWE89bJav+iHTtLM=";
|
cargoHash = "sha256-AbpWnYfBMrR6oOfy2LkQvIPYsClCWE89bJav+iHTtLM=";
|
||||||
useFetchCargoVendor = true;
|
useFetchCargoVendor = true;
|
||||||
|
patches = [
|
||||||
|
./concurrent-32.patch
|
||||||
|
];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue