diff --git a/modules/servers/jellyfin.nix b/modules/servers/jellyfin.nix index 70c3ac6..0c18608 100644 --- a/modules/servers/jellyfin.nix +++ b/modules/servers/jellyfin.nix @@ -3,11 +3,22 @@ let cfg = config.my.servers.jellyfin; sub-sync = pkgs.writeScriptBin "sub-sync" (builtins.readFile ../../scripts/sub-sync.sh); + sub-sync-path = [ + pkgs.nix + pkgs.bash + pkgs.fd + pkgs.ripgrep + pkgs.file + pkgs.alass + pkgs.ffmpeg + pkgs.gum + sub-sync + ]; 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 ] else [ ]); + ++ (if cfg.enableCron then sub-sync-path else [ ]); services = { jellyfin = { enable = true; @@ -107,12 +118,12 @@ in { restartIfChanged = true; description = "syncronizes subtitles downloaded & modified today"; wantedBy = [ "default.target" ]; - path = [ pkgs.nix sub-sync ]; + path = sub-sync-path; serviceConfig = { Restart = "on-failure"; RestartSec = 30; ExecStart = "${sub-sync}/bin/sub-sync all"; - Type = "forking"; + Type = "simple"; User = "root"; }; };