21 lines
398 B
Nix
21 lines
398 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;
|
|
};
|
|
|
|
services.webserver.vHosts.${fqdn}.locations."/".proxyPort = cfg.port;
|
|
};
|
|
}
|