helm/hosts/profiles/microbin/default.nix

22 lines
666 B
Nix
Raw Normal View History

2023-05-11 06:03:33 -07:00
{ config, lib, pkgs, ... }:
{
services.microbin.enable = true;
2024-03-15 23:25:49 -07:00
services.microbin.settings.PUBLIC_PATH = "bin.sealight.xyz";
services.microbin.settings.MICROBIN_PORT = 4949;
2023-05-11 06:03:33 -07:00
networking.firewall.allowedTCPPorts = [ 4949 ];
services.nginx.virtualHosts."bin.sealight.xyz" = {
enableACME = true;
forceSSL = true;
extraConfig = "client_max_body_size 20M;";
2023-05-11 06:03:33 -07:00
locations."/" = {
extraConfig = ''
proxy_pass http://localhost:4949/;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2023-05-11 06:03:33 -07:00
'';
};
};
}