move objects store to bolty

This commit is contained in:
Cyryl Płotnicki 2023-01-01 18:37:49 +00:00
parent c609ffe7ac
commit b779a8a3fe
4 changed files with 29 additions and 50 deletions

View file

@ -1,17 +1,12 @@
{
config,
pkgs,
inputs,
lib,
...
}: {
{ config, pkgs, inputs, lib, ... }: {
imports = [
./bolty-boot.nix
./real-hardware.nix
../cli.nix
./bolty-boot.nix
./home-assistant.nix
./matrix-server.nix
./nix-store-server.nix
./print-server.nix
./real-hardware.nix
./restic-server.nix
./woodpecker-agent.nix
];

View file

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
let
objectsPort = 10000;
adminPort = 10001;
in {
sops.secrets."minio-env" = {
sopsFile = ./minio.sops;
format = "binary";
};
networking.firewall.allowedTCPPorts = [ objectsPort adminPort ];
services.minio = {
enable = true;
region = "cyplodev";
dataDir = [ "/var/lib/minio/data" ];
configDir = "/var/lib/minio/config";
listenAddress = ":${toString objectsPort}";
consoleAddress = ":${toString adminPort}";
rootCredentialsFile = "${config.sops.secrets.minio-env.path}";
};
}

View file

@ -1,38 +0,0 @@
{
config,
pkgs,
...
}: let
domain = "objects.cyplo.dev";
adminDomain = "objects-admin.cyplo.dev";
objectsPort = 10000;
adminPort = 10001;
in {
services.nginx = {
virtualHosts = {
"${domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {proxyPass = "http://127.0.0.1:" + toString objectsPort;};
};
"${adminDomain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {proxyPass = "http://127.0.0.1:" + toString adminPort;};
};
};
};
sops.secrets."minio-env" = {
sopsFile = ./minio.sops;
format = "binary";
};
services.minio = {
enable = true;
region = "cyplodev";
dataDir = ["/var/lib/minio/data"];
configDir = "/var/lib/minio/config";
listenAddress = ":${toString objectsPort}";
consoleAddress = ":${toString adminPort}";
rootCredentialsFile = "${config.sops.secrets.minio-env.path}";
};
}