1
Fork 0
satellite/modules/nixos/nginx.nix

14 lines
410 B
Nix
Raw Normal View History

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-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-02-03 15:34:35 +01:00
locations."/" = { proxyPass = "http://127.0.0.1:${toString port}"; } // extra;
2024-01-31 21:59:11 +01:00
};
}