masive rewriting and setup of server files
This commit is contained in:
@@ -22,16 +22,19 @@ let
|
||||
in
|
||||
{
|
||||
options.my.servers.jellyfin = setup.mkOptions "jellyfin" "flix" 8096;
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.jellyfin-ffmpeg
|
||||
] ++ (if cfg.enableCron then sub-sync-path else [ ]);
|
||||
config = {
|
||||
networking.firewall.allowedTCPPorts = lib.mkIf (!cfg.isLocal) [ cfg.port ];
|
||||
environment = {
|
||||
systemPackages = lib.mkIf cfg.enable (
|
||||
[ pkgs.jellyfin-ffmpeg ] ++ (if cfg.enableCron then sub-sync-path else [ ])
|
||||
);
|
||||
};
|
||||
services = {
|
||||
jellyfin = {
|
||||
jellyfin = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
group = "piracy";
|
||||
};
|
||||
nginx = {
|
||||
nginx = lib.mkIf cfg.enableProxy {
|
||||
appendHttpConfig = ''
|
||||
# JELLYFIN
|
||||
proxy_cache_path /var/cache/nginx/jellyfin-videos levels=1:2 keys_zone=jellyfin-videos:100m inactive=1d max_size=35000m;
|
||||
@@ -48,7 +51,7 @@ in
|
||||
# use a variable to store the upstream proxy
|
||||
# in this example we are using a hostname which is resolved via DNS
|
||||
# (if you aren't using DNS remove the resolver line and change the variable to point to an IP address
|
||||
resolver ${config.my.localhost} valid=30;
|
||||
resolver ${cfg.ip} valid=30;
|
||||
|
||||
location = / {
|
||||
return 302 http://$host/web/;
|
||||
|
||||
Reference in New Issue
Block a user