nixos/modules/homelab/plex.nix

28 lines
491 B
Nix
Raw Normal View History

{
config,
pkgsUnstable,
lib,
...
}:
lib.mkIf config.fireproof.homelab.enable (let
2025-03-09 20:30:33 +01:00
domain = "plex.nickolaj.com";
in {
services.nginx.virtualHosts."${domain}" = {
forceSSL = true;
enableACME = true;
http2 = true;
locations."/" = {
proxyWebsockets = true;
proxyPass = "http://localhost:32400/";
};
};
services.plex = {
enable = true;
2025-05-14 15:23:51 +02:00
package = pkgsUnstable.plex;
2025-03-09 20:30:33 +01:00
openFirewall = true;
2025-04-23 00:02:00 +02:00
user = "media";
group = "media";
2025-03-09 20:30:33 +01:00
};
})