mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
28 lines
528 B
Nix
28 lines
528 B
Nix
|
|
{
|
||
|
|
config,
|
||
|
|
lib,
|
||
|
|
...
|
||
|
|
}:
|
||
|
|
lib.mkIf config.fireproof.homelab.enable (let
|
||
|
|
domain = "jellyfin.nickolaj.com";
|
||
|
|
in {
|
||
|
|
services.restic.backups.homelab.paths = [config.services.jellyfin.dataDir];
|
||
|
|
|
||
|
|
services.nginx.virtualHosts."${domain}" = {
|
||
|
|
forceSSL = true;
|
||
|
|
enableACME = true;
|
||
|
|
http2 = true;
|
||
|
|
locations."/" = {
|
||
|
|
proxyWebsockets = true;
|
||
|
|
proxyPass = "http://localhost:8096/";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
services.jellyfin = {
|
||
|
|
enable = true;
|
||
|
|
openFirewall = true;
|
||
|
|
user = "media";
|
||
|
|
group = "media";
|
||
|
|
};
|
||
|
|
})
|