1
Fork 0
satellite/modules/nixos/nginx.nix
2024-02-03 15:34:35 +01:00

14 lines
410 B
Nix

{ lib, ... }: {
options.satellite.proxy = lib.mkOption {
type = lib.types.functionTo (lib.types.functionTo lib.types.anything);
description = "Helper function for generating a quick proxy config";
};
config.satellite.proxy = port: extra: {
enableACME = true;
acmeRoot = null;
forceSSL = true;
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; } // extra;
};
}