Files
nixos/modules/services/owncast.nix
2025-02-15 11:16:40 +02:00

23 lines
412 B
Nix

{ lib, config, ... }:
let
cfg = config.services.owncast;
fqdn = "${cfg.subdomain}.${config.networking.domain}";
in
{
options.services.owncast = {
subdomain = lib.mkOption {
type = lib.types.str;
};
};
config = lib.mkIf cfg.enable {
services = {
owncast = {
openFirewall = true;
};
webserver.vHosts.${fqdn}.locations."/".proxyPort = cfg.port;
};
};
}