add garage instance
This commit is contained in:
parent
97e8b1f963
commit
1c76f46e5c
2 changed files with 63 additions and 0 deletions
44
modules/garage.nix
Normal file
44
modules/garage.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
let
|
||||
zerotier_interface = "zts7mq7onf";
|
||||
zerotier_ip =
|
||||
self.nixosConfigurations.${config.networking.hostName}.config.clan.core.vars.generators.zerotier.files.zerotier-ip.value;
|
||||
in
|
||||
{
|
||||
services.garage = {
|
||||
package = pkgs.garage;
|
||||
settings = {
|
||||
metadata_dir = "/var/lib/garage/meta";
|
||||
data_dir = "/var/lib/garage/data";
|
||||
db_engine = "sqlite";
|
||||
|
||||
replication_factor = 2;
|
||||
|
||||
rpc_bind_addr = "[${zerotier_ip}]:3901";
|
||||
|
||||
s3_api = {
|
||||
api_bind_addr = "127.0.0.1:3900";
|
||||
s3_region = "garage";
|
||||
root_domain = ".s3.garage.home.rpqt.fr";
|
||||
};
|
||||
|
||||
s3_web = {
|
||||
bind_addr = "127.0.0.1:3902";
|
||||
root_domain = ".web.garage.home.rpqt.fr";
|
||||
};
|
||||
|
||||
admin = {
|
||||
api_bind_addr = "127.0.0.1:3903";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.interfaces.${zerotier_interface} = {
|
||||
allowedTCPPorts = [ 3901 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue