diff options
| author | Max Audron <audron@cocaine.farm> | 2024-02-04 11:19:56 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2024-02-04 11:19:56 +0100 |
| commit | a6505df173af299265de79fec176e8491f9a22ba (patch) | |
| tree | d15b2f859d98752e669356f8afa2577ccc5b9331 /modules/garage/default.nix | |
| parent | add palworld server (diff) | |
update to 23.11 and move garage
Diffstat (limited to '')
| -rw-r--r-- | modules/garage/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/garage/default.nix b/modules/garage/default.nix new file mode 100644 index 0000000..9bc2998 --- /dev/null +++ b/modules/garage/default.nix @@ -0,0 +1,58 @@ +{ self, config, lib, pkgs, ... }: + +with self.lib.nginx; +{ + services.garage = { + enable = true; + package = pkgs.garage_0_9_0; + settings = { + replication_mode = 3; + metadata_dir = "/var/lib/garage/meta"; + data_dir = "/var/lib/garage/data"; + db_engine = "lmdb"; + + compression_level = 2; + + rpc_bind_addr = "${config.wireguard.v4.address}:3901"; + rpc_public_addr = "${config.wireguard.v4.address}:3901"; + rpc_secret = "37e1edc5a5eefb8901ca314bcfbd21cb803fbfb0a780b80a547fddf641284503"; + + bootstrap_peers = [ ]; + + s3_api = { + s3_region = "cdn"; + api_bind_addr = "127.0.0.1:3900"; + root_domain = "s3.vapor.systems"; + }; + + s3_web = { + bind_addr = "127.0.0.1:3902"; + root_domain = "web.vapor.systems"; + index = "index.html"; + }; + }; + }; + + security.acme.certs = { + "vapor.systems" = { + extraDomainNames = [ "*.vapor.systems" ]; + }; + "gnulag.net" = { + extraDomainNames = [ "*.gnulag.net" ]; + }; + "linuxmasterrace.org" = { + extraDomainNames = [ "*.linuxmasterrace.org" ]; + }; + }; + + services.nginx = { + enable = true; + virtualHosts = { + "s3.vapor.systems" = (proxyDomain "vapor.systems" "http://127.0.0.1:3900/"); + "web.vapor.systems" = (proxyDomain "vapor.systems" "http://127.0.0.1:3902/"); + "gnulag.net" = (proxyDomain "gnulag.net" "http://127.0.0.1:3902/"); + "linuxmasterrace.org" = (proxyDomain "linuxmasterrace.org" "http://127.0.0.1:3902/"); + "dash.linuxmasterrace.org" = (proxyDomain "linuxmasterrace.org" "http://127.0.0.1:3902/"); + }; + }; +} |
