mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-08-27 21:43:57 +02:00
fix(aquamarine): remove insecure MinIO service
This commit is contained in:
@@ -93,38 +93,6 @@ in
|
|||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:8880
|
reverse_proxy http://localhost:8880
|
||||||
'';
|
'';
|
||||||
virtualHosts."minio.writefor.fun".extraConfig = ''
|
|
||||||
${hostCommonConfig}
|
|
||||||
encode zstd gzip
|
|
||||||
reverse_proxy http://localhost:9096 {
|
|
||||||
header_up Host {http.request.host}
|
|
||||||
header_up X-Real-IP {http.request.remote.host}
|
|
||||||
header_up X-Forwarded-For {http.request.header.X-Forwarded-For}
|
|
||||||
header_up X-Forwarded-Proto {scheme}
|
|
||||||
transport http {
|
|
||||||
dial_timeout 300s
|
|
||||||
read_timeout 300s
|
|
||||||
write_timeout 300s
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
virtualHosts."minio-ui.writefor.fun".extraConfig = ''
|
|
||||||
${hostCommonConfig}
|
|
||||||
encode zstd gzip
|
|
||||||
reverse_proxy http://localhost:9097 {
|
|
||||||
header_up Host {http.request.host}
|
|
||||||
header_up X-Real-IP {http.request.remote.host}
|
|
||||||
header_up X-Forwarded-For {http.request.header.X-Forwarded-For}
|
|
||||||
header_up X-Forwarded-Proto {scheme}
|
|
||||||
header_up Upgrade {http.request.header.Upgrade}
|
|
||||||
header_up Connection {http.request.header.Connection}
|
|
||||||
transport http {
|
|
||||||
dial_timeout 300s
|
|
||||||
read_timeout 300s
|
|
||||||
write_timeout 300s
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
# Allow http access for specific api (do not redirect to https)
|
# Allow http access for specific api (do not redirect to https)
|
||||||
# virtualHosts."http://xxx.writefor.fun/a/b/c".extraConfig = ''
|
# virtualHosts."http://xxx.writefor.fun/a/b/c".extraConfig = ''
|
||||||
# encode zstd gzip
|
# encode zstd gzip
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
let
|
|
||||||
dataDir = [ "/data/apps/minio/data" ];
|
|
||||||
configDir = "/data/apps/minio/config";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# https://github.com/NixOS/nixpkgs/blob/nixos-26.05/nixos/modules/services/web-servers/minio.nix
|
|
||||||
services.minio = {
|
|
||||||
enable = true;
|
|
||||||
browser = true; # Enable or disable access to web UI.
|
|
||||||
|
|
||||||
inherit dataDir configDir;
|
|
||||||
listenAddress = "127.0.0.1:9096";
|
|
||||||
consoleAddress = "127.0.0.1:9097"; # Web UI
|
|
||||||
region = "us-east-1"; # default to us-east-1, same as AWS S3.
|
|
||||||
|
|
||||||
# File containing the MINIO_ROOT_USER, default is “minioadmin”, and MINIO_ROOT_PASSWORD (length >= 8), default is “minioadmin”;
|
|
||||||
rootCredentialsFile = config.age.secrets."minio.env".path;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -58,11 +58,6 @@
|
|||||||
href: "https://sftpgo.writefor.fun/web/admin/folders"
|
href: "https://sftpgo.writefor.fun/web/admin/folders"
|
||||||
description: WebDAV & SFTP server
|
description: WebDAV & SFTP server
|
||||||
siteMonitor: https://sftpgo.writefor.fun/
|
siteMonitor: https://sftpgo.writefor.fun/
|
||||||
- MinIO:
|
|
||||||
icon: minio.png
|
|
||||||
href: "https://minio-ui.writefor.fun/"
|
|
||||||
description: S3 compatible object storage
|
|
||||||
siteMonitor: "https://minio-ui.writefor.fun/"
|
|
||||||
- Gitea:
|
- Gitea:
|
||||||
icon: gitea.png
|
icon: gitea.png
|
||||||
href: "https://git.writefor.fun/"
|
href: "https://git.writefor.fun/"
|
||||||
|
|||||||
@@ -175,11 +175,6 @@ in
|
|||||||
mode = "0400";
|
mode = "0400";
|
||||||
owner = "sftpgo";
|
owner = "sftpgo";
|
||||||
};
|
};
|
||||||
"minio.env" = {
|
|
||||||
file = "${mysecrets}/server/minio.env.age";
|
|
||||||
mode = "0400";
|
|
||||||
owner = "minio";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user