mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
35 lines
737 B
Nix
Executable file
35 lines
737 B
Nix
Executable file
{flake, ...}: let
|
|
inherit (flake.config.services.instances) owncast web;
|
|
service = owncast;
|
|
localhost = web.localhost.address1;
|
|
host = "${service.subdomain}.${web.domains.url1}";
|
|
in {
|
|
services = {
|
|
owncast = {
|
|
enable = true;
|
|
listen = localhost;
|
|
port = service.ports.port0;
|
|
openFirewall = true;
|
|
};
|
|
caddy = {
|
|
virtualHosts = {
|
|
"${host}" = {
|
|
extraConfig = ''
|
|
reverse_proxy ${localhost}:${toString service.ports.port0}
|
|
|
|
tls ${service.ssl.cert} ${service.ssl.key}
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
networking = {
|
|
firewall = {
|
|
allowedTCPPorts = [
|
|
service.ports.port0
|
|
service.ports.port1
|
|
];
|
|
};
|
|
};
|
|
}
|