dump
All checks were successful
Hello World / test (push) Successful in 12s

This commit is contained in:
plasmagoat 2025-07-05 11:12:20 +02:00
parent 4ed9ba0d24
commit a90630ecb6
98 changed files with 2063 additions and 729 deletions

View file

@ -0,0 +1,44 @@
{config, ...}: {
services.prometheus.exporters.exportarr-sonarr = {
enable = true;
url = "http://media.lab:8989";
port = 9707;
openFirewall = true;
apiKeyFile = config.sops.secrets.sonarr-api-key.path;
};
services.prometheus.exporters.exportarr-readarr = {
enable = true;
url = "http://media.lab:8787";
port = 9708;
openFirewall = true;
apiKeyFile = config.sops.secrets.readarr-api-key.path;
};
services.prometheus.exporters.exportarr-radarr = {
enable = true;
url = "http://media.lab:7878";
port = 9709;
openFirewall = true;
apiKeyFile = config.sops.secrets.radarr-api-key.path;
};
services.prometheus.exporters.exportarr-prowlarr = {
enable = true;
url = "http://media.lab:9696";
port = 9710;
openFirewall = true;
apiKeyFile = config.sops.secrets.prowlarr-api-key.path;
};
services.prometheus.exporters.exportarr-lidarr = {
enable = true;
url = "http://media.lab:8686";
port = 9711;
openFirewall = true;
apiKeyFile = config.sops.secrets.lidarr-api-key.path;
};
services.prometheus.exporters.exportarr-bazarr = {
enable = true;
url = "http://media.lab:6767";
port = 9712;
openFirewall = true;
apiKeyFile = config.sops.secrets.bazarr-api-key.path;
};
}

View file

@ -0,0 +1,12 @@
{
imports = [
../../templates/base.nix
../../secrets/shared-sops.nix
./networking.nix
./storage.nix
./nixarr.nix
./exportarr.nix
./jellyfin-exporter.nix
./sops.nix
];
}

View file

@ -0,0 +1,8 @@
{config, ...}: {
services.prometheus.exporters.json = {
enable = true;
configFile = config.sops.secrets.jellyfin-exporter-config.path;
openFirewall = true;
user = "jellyfin";
};
}

View file

@ -0,0 +1,3 @@
{
networking.hostName = "media";
}

View file

@ -0,0 +1,42 @@
{config, ...}: {
nixarr = {
enable = true;
# These two values are also the default, but you can set them to whatever
# else you want
# WARNING: Do _not_ set them to `/home/user/whatever`, it will not work!
mediaDir = "/data/media";
stateDir = "/data/media/.state/nixarr";
vpn = {
enable = true;
# WARNING: This file must _not_ be in the config git directory
# You can usually get this wireguard file from your VPN provider
wgConf = config.sops.secrets.nixarr-vpn-conf.path;
};
jellyfin = {
enable = true;
};
transmission = {
enable = true;
vpn.enable = true;
peerPort = 51820; # Set this to the port forwarded by your VPN
};
# It is possible for this module to run the *Arrs through a VPN, but it
# is generally not recommended, as it can cause rate-limiting issues.
bazarr.enable = true;
lidarr.enable = true;
prowlarr.enable = true;
radarr.enable = true;
readarr.enable = true;
sonarr.enable = true;
jellyseerr.enable = true;
recyclarr = {
enable = true;
configFile = ./recyclarr.yml;
};
};
}

View file

@ -0,0 +1,183 @@
sonarr:
series:
base_url: http://localhost:8989
api_key: !env_var SONARR_API_KEY
include:
- template: sonarr-quality-definition-series
- template: sonarr-v4-quality-profile-web-2160p-alternative
- template: sonarr-v4-custom-formats-web-2160p
- template: sonarr-v4-quality-profile-anime
- template: sonarr-v4-custom-formats-anime
custom_formats:
# HDR Formats
- trash_ids:
# Comment out the next line if you and all of your users' setups are fully DV compatible
- 9b27ab6498ec0f31a3353992e19434ca # DV (WEBDL)
# HDR10+ Boost - Uncomment the next two lines if any of your devices DO support HDR10+
- 0dad0a507451acddd754fe6dc3a7f5e7 # HDR10+ Boost
- 385e9e8581d33133c3961bdcdeffb7b4 # DV HDR10+ Boost
assign_scores_to:
- name: WEB-2160p
# Unwanted
- trash_ids:
- 32b367365729d530ca1c124a0b180c64 # Bad Dual Groups
- 82d40da2bc6923f41e14394075dd4b03 # No-RlsGroup
- e1a997ddb54e3ecbfe06341ad323c458 # Obfuscated
- 06d66ab109d4d2eddb2794d21526d140 # Retags
- 1b3994c551cbb92a2c781af061f4ab44 # Scene
assign_scores_to:
- name: WEB-2160p
# Optional SDR
# Only ever use ONE of the following custom formats:
# SDR - block ALL SDR releases
# SDR (no WEBDL) - block UHD/4k Remux and Bluray encode SDR releases, but allow SDR WEB
# - trash_ids:
# - 2016d1676f5ee13a5b7257ff86ac9a93 # SDR
# # - 83304f261cf516bb208c18c54c0adf97 # SDR (no WEBDL)
# assign_scores_to:
# - name: WEB-2160p
- trash_ids:
- 026d5aadd1a6b4e550b134cb6c72b3ca # Uncensored
- b2550eb333d27b75833e25b8c2557b38 # 10bit
assign_scores_to:
- name: Remux-1080p - Anime
score: 1075 # Adjust scoring as desired
- trash_ids:
- 418f50b10f1907201b6cfdf881f467b7 # Anime Dual Audio
assign_scores_to:
- name: Remux-1080p - Anime
score: 2000 # Adjust scoring as desired
media_naming:
series: default
season: default
episodes:
rename: true
standard: default
daily: default
anime: default
delete_old_custom_formats: true
radarr:
movies:
base_url: http://localhost:7878
api_key: !env_var RADARR_API_KEY
include:
- template: radarr-quality-definition-movie
- template: radarr-custom-formats-remux-web-2160p
- template: radarr-quality-profile-anime
- template: radarr-custom-formats-anime
quality_profiles:
- name: Remux + WEB 2160p
reset_unmatched_scores:
enabled: true
upgrade:
allowed: true
until_quality: Remux-2160p
until_score: 10000
min_format_score: 0
quality_sort: top
qualities:
- name: Remux-2160p
- name: WEB 2160p
qualities:
- WEBDL-2160p
- WEBRip-2160p
- name: Remux-1080p
- name: WEB 1080p
qualities:
- WEBDL-1080p
- WEBRip-1080p
custom_formats:
- trash_ids:
# Audio
# Uncomment the next section to enable Advanced Audio Formats
- 496f355514737f7d83bf7aa4d24f8169 # TrueHD Atmos
- 2f22d89048b01681dde8afe203bf2e95 # DTS X
- 417804f7f2c4308c1f4c5d380d4c4475 # ATMOS (undefined)
- 1af239278386be2919e1bcee0bde047e # DD+ ATMOS
- 3cafb66171b47f226146a0770576870f # TrueHD
- dcf3ec6938fa32445f590a4da84256cd # DTS-HD MA
- a570d4a0e56a2874b64e5bfa55202a1b # FLAC
- e7c2fcae07cbada050a0af3357491d7b # PCM
- 8e109e50e0a0b83a5098b056e13bf6db # DTS-HD HRA
- 185f1dd7264c4562b9022d963ac37424 # DD+
- f9f847ac70a0af62ea4a08280b859636 # DTS-ES
- 1c1a4c5e823891c75bc50380a6866f73 # DTS
- 240770601cc226190c367ef59aba7463 # AAC
- c2998bd0d90ed5621d8df281e839436e # DD
assign_scores_to:
- name: Remux + WEB 2160p
# Movie Versions
- trash_ids:
# Uncomment any of the following lines to prefer these movie versions
# - 0f12c086e289cf966fa5948eac571f44 # Hybrid
# - 570bc9ebecd92723d2d21500f4be314c # Remaster
# - eca37840c13c6ef2dd0262b141a5482f # 4K Remaster
- e0c07d59beb37348e975a930d5e50319 # Criterion Collection
- 9d27d9d2181838f76dee150882bdc58c # Masters of Cinema
- db9b4c4b53d312a3ca5f1378f6440fc9 # Vinegar Syndrome
# - 957d0f44b592285f26449575e8b1167e # Special Edition
# - eecf3a857724171f968a66cb5719e152 # IMAX
# - 9f6cbff8cfe4ebbc1bde14c7b7bec0de # IMAX Enhanced
assign_scores_to:
- name: Remux + WEB 2160p
# Optional
- trash_ids:
- b6832f586342ef70d9c128d40c07b872 # Bad Dual Groups
- cc444569854e9de0b084ab2b8b1532b2 # Black and White Editions
- ae9b7c9ebde1f3bd336a8cbd1ec4c5e5 # No-RlsGroup
- 7357cf5161efbf8c4d5d0c30b4815ee2 # Obfuscated
- 5c44f52a8714fdd79bb4d98e2673be1f # Retags
- f537cf427b64c38c8e36298f657e4828 # Scene
assign_scores_to:
- name: Remux + WEB 2160p
- trash_ids:
# Comment out the next line if you and all of your users' setups are fully DV compatible
- 923b6abef9b17f937fab56cfcf89e1f1 # DV (WEBDL)
# HDR10+ Boost - Uncomment the next two lines if any of your devices DO support HDR10+
- b17886cb4158d9fea189859409975758 # HDR10Plus Boost
- 55a5b50cb416dea5a50c4955896217ab # DV HDR10+ Boost
assign_scores_to:
- name: Remux + WEB 2160p
# Optional SDR
# Only ever use ONE of the following custom formats:
# SDR - block ALL SDR releases
# SDR (no WEBDL) - block UHD/4k Remux and Bluray encode SDR releases, but allow SDR WEB
- trash_ids:
- 9c38ebb7384dada637be8899efa68e6f # SDR
# - 25c12f78430a3a23413652cbd1d48d77 # SDR (no WEBDL)
assign_scores_to:
- name: Remux + WEB 2160p
- trash_ids:
- 064af5f084a0a24458cc8ecd3220f93f # Uncensored
- a5d148168c4506b55cf53984107c396e # 10bit
assign_scores_to:
- name: Remux-1080p - Anime
score: 1075 # Adjust scoring as desired
- trash_ids:
- 4a3b087eea2ce012fcc1ce319259a3be # Anime Dual Audio
assign_scores_to:
- name: Remux-1080p - Anime
score: 2000 # Adjust scoring as desired
media_naming:
folder: default
movie:
rename: true
standard: default
delete_old_custom_formats: true

View file

@ -0,0 +1,41 @@
{
sops.secrets.nixarr-vpn-conf = {
sopsFile = ../../secrets/nixarr/secrets.yml;
mode = "0440";
};
sops.secrets.sonarr-api-key = {
sopsFile = ../../secrets/nixarr/secrets.yml;
mode = "0440";
};
sops.secrets.radarr-api-key = {
sopsFile = ../../secrets/nixarr/secrets.yml;
mode = "0440";
};
sops.secrets.readarr-api-key = {
sopsFile = ../../secrets/nixarr/secrets.yml;
mode = "0440";
};
sops.secrets.bazarr-api-key = {
sopsFile = ../../secrets/nixarr/secrets.yml;
mode = "0440";
};
sops.secrets.lidarr-api-key = {
sopsFile = ../../secrets/nixarr/secrets.yml;
mode = "0440";
};
sops.secrets.prowlarr-api-key = {
sopsFile = ../../secrets/nixarr/secrets.yml;
mode = "0440";
};
sops.secrets.jellyfin-exporter-config = {
sopsFile = ../../secrets/nixarr/secrets.yml;
owner = "jellyfin";
};
}

View file

@ -0,0 +1,23 @@
{
boot.supportedFilesystems = ["nfs"];
services.rpcbind.enable = true;
fileSystems."/data/media/library/shows" = {
device = "192.168.1.226:/volume1/Media/TV Shows";
fsType = "nfs4";
options = ["x-systemd.automount" "noatime" "_netdev"];
};
fileSystems."/data/media/library/movies" = {
device = "192.168.1.226:/volume1/Media/Movies";
fsType = "nfs4";
options = ["x-systemd.automount" "noatime" "_netdev"];
};
fileSystems."/data/media/torrents" = {
device = "192.168.1.226:/volume1/data/torrents";
fsType = "nfs4";
options = ["x-systemd.automount" "noatime" "_netdev"];
};
}