Charlotte 🦝 Delenk
dfc4623662
Some checks failed
Hydra nas.x86_64-linux Hydra build #16338 of nixos-config:pr587:nas.x86_64-linux
Hydra packages.x86_64-linux.mautrix-whatsapp Hydra build #16423 of nixos-config:pr587:packages.x86_64-linux.mautrix-whatsapp
Hydra thinkrac.x86_64-linux Hydra build #16451 of nixos-config:pr587:thinkrac.x86_64-linux
Hydra rainbow-resort.x86_64-linux Hydra build #16450 of nixos-config:pr587:rainbow-resort.x86_64-linux
Hydra packages.aarch64-linux.mautrix-whatsapp Hydra build #16368 of nixos-config:pr587:packages.aarch64-linux.mautrix-whatsapp
Hydra vf2.riscv64-linux Hydra build #16205 of nixos-config:pr585:vf2.riscv64-linux
Hydra instance-20221213-1915.aarch64-linux Hydra build #16453 of nixos-config:pr587:instance-20221213-1915.aarch64-linux
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{
|
|
attic,
|
|
config,
|
|
lib,
|
|
system,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
disabledModules = ["services/networking/atticd.nix"];
|
|
imports = [attic.nixosModules.atticd];
|
|
services.atticd = {
|
|
enable = true;
|
|
package = attic.packages.${system}.attic-server;
|
|
credentialsFile = config.sops.secrets."services/attic".path;
|
|
settings = {
|
|
listen = "[::1]:57448";
|
|
allowed-hosts = ["attic.chir.rs"];
|
|
api-endpoint = "https://attic.chir.rs/";
|
|
database.url = "postgresql:///attic?sslmode=disable&host=/run/postgresql";
|
|
storage = {
|
|
type = "s3";
|
|
region = "us-east-1";
|
|
bucket = "attic-chir-rs";
|
|
endpoint = "https://ams1.vultrobjects.com/";
|
|
};
|
|
compression = {
|
|
type = "zstd";
|
|
level = 12;
|
|
};
|
|
chunking = {
|
|
nar-size-threshold = 131072;
|
|
min-size = 65536;
|
|
avg-size = 131072;
|
|
max-size = 262144;
|
|
};
|
|
garbage-collection.default-retention-period = "3 months";
|
|
};
|
|
};
|
|
sops.secrets."services/attic" = {};
|
|
services.postgresql.ensureDatabases = [
|
|
"attic"
|
|
];
|
|
services.caddy.virtualHosts."attic.chir.rs" = {
|
|
useACMEHost = "chir.rs";
|
|
logFormat = lib.mkForce "";
|
|
extraConfig = ''
|
|
import baseConfig
|
|
|
|
reverse_proxy http://[::1]:57448 {
|
|
trusted_proxies private_ranges
|
|
}
|
|
'';
|
|
};
|
|
}
|