2024-01-31 21:59:11 +01:00
|
|
|
{ lib, ... }: {
|
2024-01-31 22:02:29 +01:00
|
|
|
options.satellite.proxy = lib.mkOption {
|
2024-01-31 21:59:11 +01:00
|
|
|
type = lib.types.functionTo lib.types.anything;
|
|
|
|
description = "Helper function for generating a quick proxy config";
|
|
|
|
};
|
|
|
|
|
|
|
|
config.satellite.proxy = port: {
|
|
|
|
enableACME = true;
|
|
|
|
acmeRoot = null;
|
|
|
|
forceSSL = true;
|
|
|
|
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
|
|
|
};
|
|
|
|
}
|