mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
46 lines
1.5 KiB
Nix
46 lines
1.5 KiB
Nix
{ config, lib, meta, ... }: with lib; {
|
|
deploy.tf.dns.records.services_media_forward = {
|
|
inherit (config.network.dns) zone;
|
|
domain = "media";
|
|
cname = { inherit (config.network.addresses.public) target; };
|
|
};
|
|
|
|
deploy.tf.dns.records.services_owncast = {
|
|
inherit (config.network.dns) zone;
|
|
domain = "cast";
|
|
cname = { inherit (config.network.addresses.public) target; };
|
|
};
|
|
|
|
deploy.tf.dns.records.services_cloud = {
|
|
inherit (config.network.dns) zone;
|
|
domain = "cloud";
|
|
cname = { inherit (config.network.addresses.public) target; };
|
|
};
|
|
|
|
services.nginx.virtualHosts = mkMerge [
|
|
{
|
|
"cloud.${config.network.dns.domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/".proxyPass = "http://cloud.int.kittywit.ch:80/";
|
|
};
|
|
};
|
|
"media.${config.network.dns.domain}" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations = {
|
|
"/jellyfin/".proxyPass = "http://[${meta.network.nodes.yukari.network.addresses.yggdrasil.nixos.ipv6.address}]:8096/jellyfin/";
|
|
"/jellyfin/socket" = {
|
|
proxyPass = "http://[${meta.network.nodes.yukari.network.addresses.yggdrasil.nixos.ipv6.address}]:8096/jellyfin/";
|
|
extraConfig = ''
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|
|
(mkIf config.deploy.profile.trusted (import config.kw.secrets.repo.access.source { inherit config meta; }))
|
|
];
|
|
}
|