nginx reverse proxy for api and console port
This commit is contained in:
@@ -87,7 +87,10 @@
|
|||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${toString opts.port}";
|
proxyPass = "http://localhost:${toString opts.dataPort}";
|
||||||
|
};
|
||||||
|
locations."/console" = {
|
||||||
|
proxyPass = "https://localhost:${toString opts.consolePort}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,6 +32,11 @@
|
|||||||
sopsFile = ./secrets/cloudflare.json;
|
sopsFile = ./secrets/cloudflare.json;
|
||||||
key = "CF_API_KEY";
|
key = "CF_API_KEY";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"minio-root-pass" = {
|
||||||
|
sopsFile = ./secrets/minio.json;
|
||||||
|
key = "minioPass";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -72,6 +77,23 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Declare minio service manually
|
||||||
|
services.minio-service = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
dataDir = "/data/minio";
|
||||||
|
rootUser = "admin";
|
||||||
|
rootPasswordFile = config.sops.secrets."minio-root-pass".path;
|
||||||
|
|
||||||
|
dataPort = 9000; # S3 API access
|
||||||
|
consolePort = 9001; # Admin console access
|
||||||
|
|
||||||
|
default-nginx = {
|
||||||
|
enable = true;
|
||||||
|
hostname = "imgs.roypository.com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Grub Boot Loader Setup
|
# Grub Boot Loader Setup
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
+2
-1
@@ -24,7 +24,7 @@
|
|||||||
minio-service.url = "path:../homelab-services/minio-service";
|
minio-service.url = "path:../homelab-services/minio-service";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, disko, sops-nix, quasiSecrets, impermanence, tests-service }@inputs:
|
outputs = { self, nixpkgs, home-manager, disko, sops-nix, quasiSecrets, impermanence, tests-service, minio-service }@inputs:
|
||||||
let
|
let
|
||||||
nodes = [
|
nodes = [
|
||||||
{
|
{
|
||||||
@@ -53,6 +53,7 @@
|
|||||||
quasiSecrets.nixosModules.serviceList
|
quasiSecrets.nixosModules.serviceList
|
||||||
impermanence.nixosModules.impermanence
|
impermanence.nixosModules.impermanence
|
||||||
tests-service.nixosModules.default
|
tests-service.nixosModules.default
|
||||||
|
minio-service.nixosModules.default
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user