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 peerPort = 51413; 35 }; 36 sabnzbd = { 37 enable = true; 38 vpn.enable = true; 39 openFirewall = true; 40 }; 41 42 prowlarr.enable = true; 43 radarr.enable = true; 44 sonarr.enable = true; 45 seerr = { 46 enable = true; 47 openFirewall = true; 48 }; 49 50 recyclarr = { 51 enable = true; 52 configuration = { 53 sonarr = { 54 series = { 55 base_url = "http://localhost:8989"; 56 api_key = "!env_var SONARR_API_KEY"; 57 quality_definition = { 58 type = "series"; 59 }; 60 delete_old_custom_formats = true; 61 custom_formats = [ 62 { 63 trash_ids = [ 64 "85c61753df5da1fb2aab6f2a47426b09" 65 "9c11cd3f07101cdba90a2d81cf0e56b4" 66 ]; 67 assign_scores_to = [ 68 { 69 name = "WEB-DL (1080p)"; 70 score = -10000; 71 } 72 ]; 73 } 74 ]; 75 }; 76 }; 77 radarr = { 78 movies = { 79 base_url = "http://localhost:7878"; 80 api_key = "!env_var RADARR_API_KEY"; 81 quality_definition = { 82 type = "movie"; 83 }; 84 delete_old_custom_formats = true; 85 custom_formats = [ 86 { 87 trash_ids = [ 88 "570bc9ebecd92723d2d21500f4be314c" 89 "eca37840c13c6ef2dd0262b141a5482f" 90 ]; 91 assign_scores_to = [ 92 { 93 name = "HD Bluray + WEB"; 94 score = 25; 95 } 96 ]; 97 } 98 ]; 99 }; 100 }; 101 }; 102 }; 103 }; 104 105 # Avoid jellyfin blocking shutdown for 2 minutes 106 systemd.services.jellyfin.serviceConfig.TimeoutStopSec = 10; 107 108 # Install Kodi Sync Queue plugin into Jellyfin 109 systemd.services.jellyfin.serviceConfig.ExecStartPre = 110 let 111 pluginDir = "/data/.state/nixarr/jellyfin/data/plugins/Kodi Sync Queue/15.0.0.0"; 112 in 113 pkgs.writeShellScript "install-jellyfin-plugins" '' 114 mkdir -p "${pluginDir}" 115 cp -f ${jellyfinKodiSyncQueue}/*.dll ${jellyfinKodiSyncQueue}/meta.json "${pluginDir}/" 116 ''; 117 }; 118}