me like nix
0

Configure Feed

Select the types of activity you want to include in your feed.

1{ inputs, ... }: 2 3let 4 jellyfinKodiSyncQueue = inputs.nixpkgs.legacyPackages.x86_64-linux.fetchzip { 5 url = "https://repo.jellyfin.org/releases/plugin/kodi-sync-queue/kodi-sync-queue_15.0.0.0.zip"; 6 stripRoot = false; 7 hash = "sha256-xtlG3UQ/WClt/Hvxe+oId2CeJ+PWMDXBUJXh5+k+mZQ="; 8 }; 9in 10{ 11 flake.modules.nixos.media-server = 12 { pkgs, config, ... }: 13 { 14 services.flaresolverr.enable = true; 15 16 age.secrets.wireguard.file = ../secrets/wireguard.age; 17 18 nixarr = { 19 enable = true; 20 mediaDir = "/mnt/storage1/nixarr/media"; 21 vpn = { 22 enable = true; 23 wgConf = config.age.secrets.wireguard.path; 24 }; 25 26 jellyfin = { 27 enable = true; 28 openFirewall = true; 29 }; 30 31 transmission = { 32 enable = true; 33 vpn.enable = true; 34 }; 35 sabnzbd = { 36 enable = true; 37 vpn.enable = true; 38 openFirewall = true; 39 }; 40 41 prowlarr.enable = true; 42 radarr.enable = true; 43 sonarr.enable = true; 44 jellyseerr = { 45 enable = true; 46 openFirewall = true; 47 }; 48 49 recyclarr = { 50 enable = true; 51 configuration = { 52 sonarr = { 53 series = { 54 base_url = "http://localhost:8989"; 55 api_key = "!env_var SONARR_API_KEY"; 56 quality_definition = { 57 type = "series"; 58 }; 59 delete_old_custom_formats = true; 60 custom_formats = [ 61 { 62 trash_ids = [ 63 "85c61753df5da1fb2aab6f2a47426b09" 64 "9c11cd3f07101cdba90a2d81cf0e56b4" 65 ]; 66 assign_scores_to = [ 67 { 68 name = "WEB-DL (1080p)"; 69 score = -10000; 70 } 71 ]; 72 } 73 ]; 74 }; 75 }; 76 radarr = { 77 movies = { 78 base_url = "http://localhost:7878"; 79 api_key = "!env_var RADARR_API_KEY"; 80 quality_definition = { 81 type = "movie"; 82 }; 83 delete_old_custom_formats = true; 84 custom_formats = [ 85 { 86 trash_ids = [ 87 "570bc9ebecd92723d2d21500f4be314c" 88 "eca37840c13c6ef2dd0262b141a5482f" 89 ]; 90 assign_scores_to = [ 91 { 92 name = "HD Bluray + WEB"; 93 score = 25; 94 } 95 ]; 96 } 97 ]; 98 }; 99 }; 100 }; 101 }; 102 }; 103 104 # Avoid jellyfin blocking shutdown for 2 minutes 105 systemd.services.jellyfin.serviceConfig.TimeoutStopSec = 10; 106 107 # Install Kodi Sync Queue plugin into Jellyfin 108 systemd.services.jellyfin.serviceConfig.ExecStartPre = 109 let 110 pluginDir = "/data/.state/nixarr/jellyfin/data/plugins/Kodi Sync Queue/15.0.0.0"; 111 in 112 pkgs.writeShellScript "install-jellyfin-plugins" '' 113 mkdir -p "${pluginDir}" 114 cp -f ${jellyfinKodiSyncQueue}/*.dll ${jellyfinKodiSyncQueue}/meta.json "${pluginDir}/" 115 ''; 116 }; 117}