Add minio to Genesis

This commit is contained in:
Greg Hellings
2024-04-03 08:32:31 -05:00
parent a43bd4acc9
commit c729a5497a
3 changed files with 66 additions and 31 deletions
+40 -31
View File
@@ -12,7 +12,7 @@ let
"10.42.1.2 opnsense router opnsense.thehellings.lan router.thehellings.lan"
"10.42.1.3 printer.thehellings.lan"
"10.42.1.4 chronicles chronicles.thehellings.lan nas.thehellings.lan"
"10.42.1.5 genesis genesis.thehellings.lan dns dns.thehellings.lan smart smart.thehellings.lan jellyfin jellyfin.thehellings.lan speedtest.thehellings.lan nixcache.thehellings.lan"
"10.42.1.5 genesis genesis.thehellings.lan dns dns.thehellings.lan smart smart.thehellings.lan jellyfin jellyfin.thehellings.lan speedtest.thehellings.lan nixcache.thehellings.lan gitcache.thehellings.lan"
"10.42.1.6 isaiah isaiah.thehellings.lan"
"10.42.1.7 hosea hosea.thehellings.lan"
"10.42.1.12 tv"
@@ -24,7 +24,7 @@ let
"100.88.91.27 dns.home"
"100.119.228.115 chronicles.home nas.home chronicles.shire-zebra.ts.net"
"100.115.57.8 linode.home"
"100.88.91.27 genesis.home jellyfin.home smart.home zwave.home nixcache.home"
"100.88.91.27 genesis.home jellyfin.home smart.home zwave.home nixcache.home gitcache.home"
"100.84.183.79 myself.home myself.shire-zebra.ts.net"
"100.78.226.76 gitlab.home gitlab.shire-zebra.ts.net gitlab.thehellings.lan registry.thehellings.lan git.thehellings.lan"
"100.68.203.1 hosea.home hosea.shire-zebra.ts.net"
@@ -212,35 +212,44 @@ in {
"jellyfin.home".target = "http://localhost:8096/";
};
services.nginx.virtualHosts."nixcache.thehellings.lan" = {
serverName = "nixcache.thehellings.lan";
serverAliases = [ "nixcache" "nixcache.home" ];
root = "/proxy";
locations = {
"~ ^/nix-cache-info" = {
proxyPass = "https://cache.nixos.org";
root = "/proxy/nix-cache-info/store";
recommendedProxySettings = false;
extraConfig = ''
error_log /var/log/nginx/proxy.log debug;
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /proxy/nix-cache-info/temp;
proxy_pass_request_headers on;
proxy_set_header Host "cache.nixos.org";
'';
};
"~^/nar/.+$" = {
proxyPass = "https://cache.nixos.org";
root = "/proxy/nar/store";
recommendedProxySettings = false;
extraConfig = ''
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /proxy/nar/temp;
proxy_pass_request_headers on;
proxy_set_header Host "cache.nixos.org";
'';
age.secrets.minio.file = ../../secrets/minio.age;
services = {
minio = {
enable = true;
dataDir = [ "/proxy/minio" ];
rootCredentialsFile = config.age.secrets.minio.path;
};
nginx.virtualHosts."nixcache.thehellings.lan" = {
serverName = "nixcache.thehellings.lan";
serverAliases = [ "nixcache" "nixcache.home" ];
root = "/proxy";
locations = {
"~ ^/nix-cache-info" = {
proxyPass = "https://cache.nixos.org";
root = "/proxy/nix-cache-info/store";
recommendedProxySettings = false;
extraConfig = ''
error_log /var/log/nginx/proxy.log debug;
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /proxy/nix-cache-info/temp;
proxy_pass_request_headers on;
proxy_set_header Host "cache.nixos.org";
'';
};
"~^/nar/.+$" = {
proxyPass = "https://cache.nixos.org";
root = "/proxy/nar/store";
recommendedProxySettings = false;
extraConfig = ''
proxy_store on;
proxy_store_access user:rw group:rw all:r;
proxy_temp_path /proxy/nar/temp;
proxy_pass_request_headers on;
proxy_set_header Host "cache.nixos.org";
'';
};
};
};
};