mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
garage
This commit is contained in:
parent
f50cbbbeb4
commit
9ce4ff862f
15 changed files with 79 additions and 23 deletions
13
newinfra/nix/modules/garage/README.md
Normal file
13
newinfra/nix/modules/garage/README.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# garage
|
||||
|
||||
## layout
|
||||
|
||||
- co-ka -> Contabo Karlsruhe
|
||||
- co-du -> Contabo Düsseldorf
|
||||
- he-nu -> Hetzner Nürnberg
|
||||
|
||||
| name | disk space | identifier | zone |
|
||||
| ---- | ---------- | ---------- | ----- |
|
||||
| vps3 | 100GB | 020bd | co-ka |
|
||||
| vps4 | 30GB | 41e40 | he-nu |
|
||||
| vps5 | 100GB | 848d8 | co-du |
|
||||
42
newinfra/nix/modules/garage/default.nix
Normal file
42
newinfra/nix/modules/garage/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, name, ... }: {
|
||||
age.secrets.garage_secrets.file = ../../secrets/garage_secrets.age;
|
||||
|
||||
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 3901 ];
|
||||
|
||||
services.garage = {
|
||||
enable = true;
|
||||
package = pkgs.garage_1_0_0;
|
||||
settings = {
|
||||
metadata_dir = "/var/lib/garage/meta";
|
||||
data_dir = "/var/lib/garage/data";
|
||||
db_engine = "sqlite";
|
||||
metadata_auto_snapshot_interval = "6h";
|
||||
|
||||
replication_factor = 3;
|
||||
|
||||
# arbitrary, but a bit higher as disk space matters more than time. she says, cluelessly.
|
||||
compression-level = 5;
|
||||
|
||||
rpc_bind_addr = "[::]:3901";
|
||||
rpc_public_addr = "${name}.local:3901";
|
||||
|
||||
s3_api = {
|
||||
s3_region = "garage";
|
||||
api_bind_addr = "[::]:3900";
|
||||
root_domain = ".s3.garage.localhost";
|
||||
};
|
||||
|
||||
s3_web = {
|
||||
bind_addr = "[::]:3902";
|
||||
root_domain = ".web.garage.localhost";
|
||||
index = "index.html";
|
||||
};
|
||||
|
||||
admin = {
|
||||
api_bind_addr = "[::]:3903";
|
||||
};
|
||||
};
|
||||
environmentFile = config.age.secrets.garage_secrets.path;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue