diff --git a/hosts/architect/backup.nix b/hosts/architect/backup.nix index 14b3e83..61287b0 100644 --- a/hosts/architect/backup.nix +++ b/hosts/architect/backup.nix @@ -15,8 +15,8 @@ "--keep-yearly 3" ]; timerConfig = { - OnCalendar = "monday 00:05"; - RandomizedDelaySec = "2h"; + OnCalendar = "monday 03:00"; + RandomizedDelaySec = "1h"; }; }; }; diff --git a/hosts/architect/jellyfin.nix b/hosts/architect/jellyfin.nix index a408f6b..f302f9d 100644 --- a/hosts/architect/jellyfin.nix +++ b/hosts/architect/jellyfin.nix @@ -1,8 +1,8 @@ { pkgs, ... }: -let +let network = import ./network.nix; - domain = "jellyfin.giugl.io"; + domain = "media.giugl.io"; in { disabledModules = [ "services/misc/jellyfin.nix" ]; imports = [ ./modules/jellyfin.nix ]; @@ -15,11 +15,27 @@ in { }; nginx.virtualHosts.${domain} = { -# forceSSL = true; -# enableACME = true; + forceSSL = true; + enableACME = true; locations."/" = { proxyPass = "http://localhost:8096"; extraConfig = '' + # Disable buffering when the nginx proxy gets very resource heavy upon streaming + proxy_buffering off; + + allow 10.0.0.0/24; + allow 10.3.0.0/24; + deny all; + ''; + }; + + locations."/socket" = { + proxyPass = "http://localhost:8096"; + proxyWebsockets = true; + extraConfig = '' + # Disable buffering when the nginx proxy gets very resource heavy upon streaming + proxy_buffering off; + allow 10.0.0.0/24; allow 10.3.0.0/24; deny all; diff --git a/hosts/architect/modules/jellyfin.nix b/hosts/architect/modules/jellyfin.nix index 1fab5ba..e62b076 100644 --- a/hosts/architect/modules/jellyfin.nix +++ b/hosts/architect/modules/jellyfin.nix @@ -50,12 +50,10 @@ in { serviceConfig = rec { User = cfg.user; Group = cfg.group; -# # Allows access to drm devices for transcoding with hardware acceleration -# SupplementaryGroups = [ "video" ]; - StateDirectory = "jellyfin"; - CacheDirectory = "jellyfin"; + StateDirectory = "/jellyfin"; + CacheDirectory = "/jellyfin/cache"; ExecStart = - "${cfg.package}/bin/jellyfin --datadir '/var/lib/${StateDirectory}' --cachedir '/var/cache/${CacheDirectory}'"; + "${cfg.package}/bin/jellyfin --datadir '/jellyfin' --cachedir '/jellyfin/cache'"; Restart = "on-failure"; # Security options: