2024-01-31 21:59:11 +01:00
|
|
|
{ lib, ... }: {
|
2024-01-31 22:02:29 +01:00
|
|
|
options.satellite.proxy = lib.mkOption {
|
2024-02-03 15:34:35 +01:00
|
|
|
type = lib.types.functionTo (lib.types.functionTo lib.types.anything);
|
2024-01-31 21:59:11 +01:00
|
|
|
description = "Helper function for generating a quick proxy config";
|
|
|
|
};
|
|
|
|
|
2024-03-11 16:08:32 +01:00
|
|
|
options.satellite.static = lib.mkOption {
|
2024-03-11 16:14:41 +01:00
|
|
|
type = lib.types.functionTo lib.types.anything;
|
2024-03-11 16:08:32 +01:00
|
|
|
description = "Helper function for generating a quick file serving config";
|
|
|
|
};
|
|
|
|
|
2024-02-03 15:34:35 +01:00
|
|
|
config.satellite.proxy = port: extra: {
|
2024-01-31 21:59:11 +01:00
|
|
|
enableACME = true;
|
|
|
|
acmeRoot = null;
|
|
|
|
forceSSL = true;
|
2024-06-11 11:35:56 +02:00
|
|
|
locations."/" = { proxyPass = "http://localhost:${toString port}"; } // extra;
|
2024-01-31 21:59:11 +01:00
|
|
|
};
|
2024-03-11 16:08:32 +01:00
|
|
|
|
|
|
|
config.satellite.static = root: {
|
|
|
|
inherit root;
|
|
|
|
enableACME = true;
|
|
|
|
acmeRoot = null;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
2024-01-31 21:59:11 +01:00
|
|
|
}
|