22 lines
635 B
Nix
22 lines
635 B
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
services.microbin.enable = true;
|
|
services.microbin.hostname = "bin.sealight.xyz";
|
|
services.microbin.port = 4949;
|
|
networking.firewall.allowedTCPPorts = [ 4949 ];
|
|
services.nginx.virtualHosts."bin.sealight.xyz" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
extraConfig = "client_max_body_size 20M;";
|
|
|
|
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;
|
|
'';
|
|
};
|
|
};
|
|
}
|