From c729a5497a6b0121bdb13a6d4693abf7699ebc5f Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 3 Apr 2024 08:32:31 -0500 Subject: [PATCH] Add minio to Genesis --- hosts/genesis/networking.nix | 71 ++++++++++++++++++++---------------- secrets/minio.age | 25 +++++++++++++ secrets/secrets.nix | 1 + 3 files changed, 66 insertions(+), 31 deletions(-) create mode 100644 secrets/minio.age diff --git a/hosts/genesis/networking.nix b/hosts/genesis/networking.nix index f7d3034..136dbdb 100644 --- a/hosts/genesis/networking.nix +++ b/hosts/genesis/networking.nix @@ -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"; + ''; + }; }; }; }; diff --git a/secrets/minio.age b/secrets/minio.age new file mode 100644 index 0000000..7e0292f --- /dev/null +++ b/secrets/minio.age @@ -0,0 +1,25 @@ +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pHn3GREp7DR4fNc +-> ssh-ed25519 onmXpg GpSqblqZfGU8T6OEWnjjvIiJDrbof1ATs0u5paT1a0c +RSbN0/4suxvrNFg1aKT8lEsVnlA5UfxC0kVY1SaWX5s +--- IdYna1QpVSf2RdSFtgxpEQjExYm9Oq1pgtLSibXaBqc +)!0|!EcmP;6{"o}2gd^z}u:P`_`GQQ^$I]@Te"\!. \ No newline at end of file diff --git a/secrets/secrets.nix b/secrets/secrets.nix index fc29e62..99d64bd 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -41,6 +41,7 @@ in "linode-forgejo-runner.age".publicKeys = everyone; "jude-forgejo-runner.age".publicKeys = everyone; + "minio.age".publicKeys = everyone; "dendrite.age".publicKeys = everyone;