29 lines
		
	
	
		
			566 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			566 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ lib, ... }:
 | 
						|
 | 
						|
let
 | 
						|
  domain = "s3.giugl.io";
 | 
						|
  network = import ./network.nix;
 | 
						|
in {
 | 
						|
  services = {
 | 
						|
    minio.enable = true;
 | 
						|
 | 
						|
    nginx.virtualHosts.${domain} = {
 | 
						|
      forceSSL = true;
 | 
						|
      enableACME = true;
 | 
						|
      locations."/" = {
 | 
						|
        proxyPass = "http://localhost:9000";
 | 
						|
        extraConfig = ''
 | 
						|
          allow 10.0.0.0/24;
 | 
						|
          allow ${lib.concatStringsSep " " network.gdevices-wg};
 | 
						|
          deny all;
 | 
						|
        '';
 | 
						|
      };
 | 
						|
    };
 | 
						|
  };
 | 
						|
 | 
						|
  networking.extraHosts = ''
 | 
						|
    ${network.architect-lan} ${domain}
 | 
						|
    ${network.architect-wg} ${domain}
 | 
						|
  '';
 | 
						|
}
 |