mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
refactor(mediabox): break cloudflared out into a separate file
This commit is contained in:
parent
2a478a216e
commit
3d6ab37d93
2 changed files with 28 additions and 25 deletions
28
systems/mediabox/cloudflared.nix
Normal file
28
systems/mediabox/cloudflared.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{config, ...}: let
|
||||
inherit (config.services) deluge plex tautulli ombi sonarr radarr bazarr lidarr readarr prowlarr cloudflared;
|
||||
in {
|
||||
sops.secrets.cloudflare_mediabox_tunnel = {
|
||||
owner = cloudflared.user;
|
||||
};
|
||||
|
||||
services.cloudflared = let
|
||||
tunnelId = "6a3c1863-d879-462f-b5d5-7c6ddf476d0e";
|
||||
inherit (config.networking) domain;
|
||||
in {
|
||||
tunnels.${tunnelId} = {
|
||||
default = "http_status:404";
|
||||
credentialsFile = config.sops.secrets.cloudflare_mediabox_tunnel.path;
|
||||
ingress = {
|
||||
"tautulli.${domain}".service = "http://localhost:${toString tautulli.port}";
|
||||
"ombi.${domain}".service = "http://localhost:${toString ombi.port}";
|
||||
"sonarr.${domain}".service = "http://localhost:${toString sonarr.port}";
|
||||
"radarr.${domain}".service = "http://localhost:${toString radarr.port}";
|
||||
"bazarr.${domain}".service = "http://localhost:${toString bazarr.listenPort}";
|
||||
"lidarr.${domain}".service = "http://localhost:${toString lidarr.port}";
|
||||
"readarr.${domain}".service = "http://localhost:${toString readarr.port}";
|
||||
"prowlarr.${domain}".service = "http://localhost:${toString prowlarr.port}";
|
||||
"deluge.${domain}".service = "http://localhost:${toString deluge.web.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -48,31 +48,6 @@ _: {
|
|||
nixos.prowlarr
|
||||
];
|
||||
|
||||
sops.secrets.cloudflare_mediabox_tunnel = {
|
||||
owner = cloudflared.user;
|
||||
};
|
||||
|
||||
services.cloudflared = let
|
||||
tunnelId = "6a3c1863-d879-462f-b5d5-7c6ddf476d0e";
|
||||
inherit (config.networking) domain;
|
||||
in {
|
||||
tunnels.${tunnelId} = {
|
||||
default = "http_status:404";
|
||||
credentialsFile = config.sops.secrets.cloudflare_mediabox_tunnel.path;
|
||||
ingress = {
|
||||
"tautulli.${domain}".service = "http://localhost:${toString tautulli.port}";
|
||||
"ombi.${domain}".service = "http://localhost:${toString ombi.port}";
|
||||
"sonarr.${domain}".service = "http://localhost:${toString sonarr.port}";
|
||||
"radarr.${domain}".service = "http://localhost:${toString radarr.port}";
|
||||
"bazarr.${domain}".service = "http://localhost:${toString bazarr.listenPort}";
|
||||
"lidarr.${domain}".service = "http://localhost:${toString lidarr.port}";
|
||||
"readarr.${domain}".service = "http://localhost:${toString readarr.port}";
|
||||
"prowlarr.${domain}".service = "http://localhost:${toString prowlarr.port}";
|
||||
"deluge.${domain}".service = "http://localhost:${toString deluge.web.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.mediatomb = {
|
||||
serverName = "tewi";
|
||||
mediaDirectories = let
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue