From 5a1aa0eef7ba6a4549fdb6a52aa2ac3140ef9db9 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Tue, 22 Aug 2023 22:14:20 +0200 Subject: [PATCH] epyc: add garage node --- hosts/epyc.nix | 2 ++ modules/garage.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 modules/garage.nix diff --git a/hosts/epyc.nix b/hosts/epyc.nix index bf71054..128c2e8 100644 --- a/hosts/epyc.nix +++ b/hosts/epyc.nix @@ -11,10 +11,12 @@ in ../modules/hypervisor.nix ../modules/hydra/coordinator.nix ../modules/android-cache.nix + ../modules/garage.nix ../modules/users/friends.nix ]; networking.hostName = "epyc"; + boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; diff --git a/modules/garage.nix b/modules/garage.nix new file mode 100644 index 0000000..8859d9c --- /dev/null +++ b/modules/garage.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: { + services.garage = { + enable = true; + package = pkgs.garage_0_8; + settings = { + db_engine = "lmdb"; + block_size = (10 * 1024 * 1024); # 10MB + replication_mode = "none"; + rpc_bind_addr = "[::1]:3901"; + rpc_public_addr = "[::1]:3901"; + rpc_secret = "f5b8ede0abe0a3d454d96e8b352e29a1d94522b64274d23b256d57482441ccc1"; + + s3_api = { + s3_region = "garage"; + api_bind_addr = "[::1]:3900"; + root_domain = ".s3.infra.newtype.fr"; + }; + + s3_web = { + bind_addr = "[::1]:3902"; + root_domain = ".web.infra.newtype.fr"; + index = "index.html"; + }; + }; + }; +}