Files
nixos/modules/services/owncast.nix
Joakim Repomaa c519f8d83e refactor
2025-02-12 23:54:07 +02:00

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;
};
}