cluster/services/object-storage: drop
This commit is contained in:
parent
8a53e376bd
commit
0a390ad0d7
4 changed files with 0 additions and 94 deletions
|
@ -1,23 +0,0 @@
|
||||||
{ config, depot, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
services.object-storage = {
|
|
||||||
nodes.host = [ "VEGAS" ];
|
|
||||||
nixos.host = ./host.nix;
|
|
||||||
};
|
|
||||||
|
|
||||||
monitoring.blackbox.targets.object-storage = {
|
|
||||||
address = "https://object-storage.${depot.lib.meta.domain}/minio/health/live";
|
|
||||||
module = "https2xx";
|
|
||||||
};
|
|
||||||
|
|
||||||
dns.records = let
|
|
||||||
serverAddrs = map
|
|
||||||
(node: depot.hours.${node}.interfaces.primary.addrPublic)
|
|
||||||
config.services.object-storage.nodes.host;
|
|
||||||
in {
|
|
||||||
object-storage.target = serverAddrs;
|
|
||||||
"console.object-storage".target = serverAddrs;
|
|
||||||
cdn.target = serverAddrs;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,70 +0,0 @@
|
||||||
{ config, lib, depot, ... }:
|
|
||||||
with depot.lib.nginx;
|
|
||||||
let
|
|
||||||
inherit (config) links;
|
|
||||||
|
|
||||||
mapPaths = lib.mapAttrsRecursive (
|
|
||||||
path: value: lib.nameValuePair
|
|
||||||
(lib.toUpper (lib.concatStringsSep "_" path))
|
|
||||||
(toString value)
|
|
||||||
);
|
|
||||||
|
|
||||||
translateConfig = config: lib.listToAttrs (
|
|
||||||
lib.collect
|
|
||||||
(x: x ? name && x ? value)
|
|
||||||
(mapPaths config)
|
|
||||||
);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
links = {
|
|
||||||
minio.protocol = "http";
|
|
||||||
minioConsole.protocol = "http";
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets.minio-root-credentials = {
|
|
||||||
file = ../../../secrets/minio-root-credentials.age;
|
|
||||||
owner = "root";
|
|
||||||
group = "root";
|
|
||||||
mode = "0400";
|
|
||||||
};
|
|
||||||
services.minio = {
|
|
||||||
enable = true;
|
|
||||||
rootCredentialsFile = config.age.secrets.minio-root-credentials.path;
|
|
||||||
dataDir = [ "/srv/storage/objects" ];
|
|
||||||
browser = true;
|
|
||||||
listenAddress = links.minio.tuple;
|
|
||||||
consoleAddress = links.minioConsole.tuple;
|
|
||||||
};
|
|
||||||
systemd.services.minio.serviceConfig = {
|
|
||||||
Slice = "remotefshost.slice";
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts = mappers.mapSubdomains {
|
|
||||||
# TODO: vhosts.proxy?
|
|
||||||
"object-storage" = vhosts.basic // {
|
|
||||||
locations = {
|
|
||||||
"/".proxyPass = links.minio.url;
|
|
||||||
"= /dashboard".proxyPass = links.minio.url;
|
|
||||||
};
|
|
||||||
extraConfig = "client_max_body_size 4G;";
|
|
||||||
};
|
|
||||||
"console.object-storage" = vhosts.basic // {
|
|
||||||
locations = {
|
|
||||||
"/".proxyPass = links.minioConsole.url;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
"cdn" = lib.recursiveUpdate (vhosts.proxy "${links.minio.url}/content-delivery$request_uri") {
|
|
||||||
locations."= /".return = "302 /index.html";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
systemd.services.minio.environment = translateConfig {
|
|
||||||
minio.browser_redirect_url = "https://console.object-storage.${domain}";
|
|
||||||
minio.identity_openid = {
|
|
||||||
enable = "on";
|
|
||||||
display_name = "Private Void Account";
|
|
||||||
config_url = "https://login.${domain}/auth/realms/master/.well-known/openid-configuration";
|
|
||||||
client_id = "net.privatevoid.object-storage1";
|
|
||||||
claim_name = "minio_policy";
|
|
||||||
redirect_uri_dynamic = "on";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -78,7 +78,6 @@ in with hosts;
|
||||||
"secrets/hyprspace-key-prophet.age".publicKeys = max ++ map systemKeys [ prophet ];
|
"secrets/hyprspace-key-prophet.age".publicKeys = max ++ map systemKeys [ prophet ];
|
||||||
"secrets/keycloak-dbpass.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
"secrets/keycloak-dbpass.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
||||||
"secrets/matrix-appservice-discord-token.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
"secrets/matrix-appservice-discord-token.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
||||||
"secrets/minio-root-credentials.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
|
||||||
"secrets/nextcloud-adminpass.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
"secrets/nextcloud-adminpass.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
||||||
"secrets/nextcloud-dbpass.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
"secrets/nextcloud-dbpass.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
||||||
"secrets/oauth2_proxy-secrets.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
"secrets/oauth2_proxy-secrets.age".publicKeys = max ++ map systemKeys [ VEGAS ];
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue