diff --git a/modules/config/instances/config/jellyfin.nix b/modules/config/instances/config/jellyfin.nix index 477a4a5..d4d7767 100755 --- a/modules/config/instances/config/jellyfin.nix +++ b/modules/config/instances/config/jellyfin.nix @@ -18,6 +18,7 @@ in subdomain = jellyfinName; paths = { path0 = "${servicePath}/${jellyfinLabel}"; + path1 = "${servicePath}/${jellyfinLabel}/cache"; }; ports = { port0 = 5055; # Jellyseer diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 88a7a44..05de450 100755 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -77,7 +77,7 @@ in acme audiobookshelf caddy - # jellyfin + jellyfin logrotate mastodon minecraft diff --git a/modules/nixos/services/jellyfin/default.nix b/modules/nixos/services/jellyfin/default.nix index 9de69c2..3055703 100755 --- a/modules/nixos/services/jellyfin/default.nix +++ b/modules/nixos/services/jellyfin/default.nix @@ -1,15 +1,8 @@ { flake, ... }: let - inherit (flake.config.people) - user0 - ; - inherit (flake.config.machines.devices) - ceres - ; - inherit (flake.config.services.instances) - jellyfin - web - ; + inherit (flake.config.people) user0; + inherit (flake.config.machines.devices) ceres; + inherit (flake.config.services.instances) jellyfin web; service = jellyfin; localhost = web.localhost.address0; host = "${service.subdomain}.${web.domains.url0}"; @@ -41,30 +34,24 @@ in }; }; - fileSystems = - let - settings = { - fsType = "none"; - options = [ - "bind" - ]; - depends = [ - ceres.storage0.mount - ]; - }; - in - { - "/var/lib/${service.name}" = { - device = service.paths.path0; - } // settings; - "/var/cache/${service.name}" = { - device = "${service.paths.path0}/cache"; - } // settings; + fileSystems = { + "/var/lib/${service.name}" = { + device = service.paths.path0; + fsType = "none"; + options = [ "bind" ]; + depends = [ ceres.storage0.mount ]; }; + "/var/cache/${service.name}" = { + device = service.paths.path1; + fsType = "none"; + options = [ "bind" ]; + depends = [ ceres.storage0.mount ]; + }; + }; systemd.tmpfiles.rules = [ "Z ${service.paths.path0} 0755 ${user0} ${service.name} -" - "Z ${service.paths.path0}/cache 0755 ${user0} ${service.name} -" + "Z ${service.paths.path1} 0755 ${user0} ${service.name} -" ]; networking = {