add plex to media server module
This commit is contained in:
parent
2c28fa2719
commit
08b360a1d6
5 changed files with 53 additions and 0 deletions
|
|
@ -21,6 +21,10 @@
|
|||
name = "Immich";
|
||||
url = "https://photo.yanlincs.com/photos";
|
||||
}
|
||||
{
|
||||
name = "Plex";
|
||||
url = "https://plex.yanlincs.com";
|
||||
}
|
||||
{
|
||||
name = "Jellyfin";
|
||||
url = "https://jellyfin.yanlincs.com";
|
||||
|
|
|
|||
|
|
@ -27,6 +27,17 @@
|
|||
};
|
||||
};
|
||||
|
||||
plex = {
|
||||
rule = "Host(`plex.${config.networking.hostName}.yanlincs.com`)";
|
||||
service = "plex";
|
||||
tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = [{
|
||||
main = "*.${config.networking.hostName}.yanlincs.com";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services = {
|
||||
|
|
@ -46,6 +57,14 @@
|
|||
};
|
||||
};
|
||||
|
||||
plex = {
|
||||
loadBalancer = {
|
||||
servers = [{
|
||||
url = "http://127.0.0.1:32400";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@
|
|||
radarr.enable = true;
|
||||
jellyfin.enable = true;
|
||||
deluge.enable = true;
|
||||
plex.enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Plex Media Server
|
||||
plex = {
|
||||
rule = "Host(`plex.yanlincs.com`)";
|
||||
service = "plex";
|
||||
tls = {
|
||||
certResolver = "cloudflare";
|
||||
domains = [{
|
||||
main = "*.yanlincs.com";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
services = {
|
||||
|
|
@ -157,6 +169,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Plex backend
|
||||
plex = {
|
||||
loadBalancer = {
|
||||
servers = [{
|
||||
url = "http://lan.hs.yanlincs.com:32400";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ in
|
|||
radarr.enable = lib.mkEnableOption "Radarr movie management"; # port 7878
|
||||
jellyfin.enable = lib.mkEnableOption "Jellyfin media server"; # port 8096
|
||||
deluge.enable = lib.mkEnableOption "Deluge torrent client"; # web port 8112
|
||||
plex.enable = lib.mkEnableOption "Plex media server"; # port 32400
|
||||
};
|
||||
|
||||
config = {
|
||||
|
|
@ -59,5 +60,12 @@ in
|
|||
web.enable = true;
|
||||
web.openFirewall = false;
|
||||
};
|
||||
|
||||
services.plex = lib.mkIf cfg.plex.enable {
|
||||
enable = true;
|
||||
user = cfg.user;
|
||||
group = cfg.group;
|
||||
openFirewall = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue