1
Fork 0
satellite/modules/nixos/cloudflared.nix
2024-05-11 00:52:55 +02:00

23 lines
567 B
Nix

{ config, lib, ... }:
let cfg = config.satellite.cloudflared;
in
{
options.satellite.cloudflared = {
tunnel = lib.mkOption {
type = lib.types.string;
description = "Cloudflare tunnel id to use for the `satellite.cloudflared.proxy` helper";
};
proxy = lib.mkOption {
type = lib.types.functionTo lib.types.anything;
description = "Helper function for generating a quick proxy config";
};
};
config.satellite.cloudflared.proxy = from: {
${cfg.tunnel} = {
ingress.${from} = "http://localhost:8418";
};
};
}