nixos/jackflix: Add Jellyfin

This commit is contained in:
Jack O'Sullivan 2022-06-12 14:56:44 +01:00
parent 7e5c051bfc
commit e52518259c
3 changed files with 38 additions and 0 deletions

View File

@ -74,6 +74,8 @@
jackett.enable = true;
radarr.enable = true;
jellyfin.enable = true;
};
};
};

View File

@ -191,6 +191,30 @@ in
}
(ssoServer "generic")
];
"jackflix-test.${lib.my.pubDomain}" =
let
upstream = "http://jackflix-ctr.${config.networking.domain}:8096";
in
{
extraConfig = ''
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
'';
locations = {
"/".proxyPass = upstream;
"= /".return = "302 https://$host/web/";
"= /web/".proxyPass = "${upstream}/web/index.html";
"/socket" = {
proxyPass = upstream;
proxyWebsockets = true;
};
};
useACMEHost = lib.my.pubDomain;
};
};
in
mkMerge [

View File

@ -268,6 +268,18 @@ in
}
];
})
(mkIf config.services.jellyfin.enable {
my.tmproot.persistence.config.directories = [
{
directory = "/var/lib/jellyfin";
inherit (config.services.jellyfin) user group;
}
{
directory = "/var/cache/jellyfin";
inherit (config.services.jellyfin) user group;
}
];
})
(persistSimpleSvc "transmission")
(persistSimpleSvc "jackett")
(persistSimpleSvc "radarr")