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

26 lines
717 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";
};
options.satellite.static = lib.mkOption {
type = lib.types.functionTo lib.types.anything;
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
};
config.satellite.static = root: {
inherit root;
enableACME = true;
acmeRoot = null;
forceSSL = true;
};
2024-01-31 21:59:11 +01:00
}