I'd like less generations please side note: it's a bit weird that you can't specify how many generations you'd like to keep, like what if I want 3 generations to stay available?
111 lines
3.1 KiB
Nix
111 lines
3.1 KiB
Nix
{ lib, config, ... }:
|
|
{
|
|
options.jellyfin.enable = lib.mkEnableOption "enable jellfin service";
|
|
config = lib.mkIf config.jellyfin.enable {
|
|
fileSystems."/mnt/media" = {
|
|
device = "192.168.50.240:/mnt/tank/Media";
|
|
fsType = "nfs";
|
|
options = [ "defaults" ];
|
|
};
|
|
|
|
services.gatus.settings.endpoints = [
|
|
{
|
|
name = "jellyfin";
|
|
group = "local";
|
|
url = "http://localhost:8096/System/Ping";
|
|
interval = "30s";
|
|
conditions = [''[BODY] == "Jellyfin Server"''];
|
|
}
|
|
];
|
|
|
|
sops.secrets."jellyfin/jellarr-env".owner = config.services.jellarr.user;
|
|
sops.secrets."jellyfin/zachary".owner = config.services.jellarr.user;
|
|
|
|
services.jellarr = {
|
|
enable = true;
|
|
environmentFile = config.sops.secrets."jellyfin/jellarr-env".path;
|
|
config = {
|
|
version = 1;
|
|
base_url = "http://localhost:8096";
|
|
startup = {
|
|
completeStartupWizard = true;
|
|
};
|
|
encoding = {
|
|
allowAv1Encoding = false;
|
|
allowHevcEncoding = false;
|
|
enableDecodingColorDepth10Hevc = true;
|
|
enableDecodingColorDepth10HevcRext = true;
|
|
enableDecodingColorDepth12HevcRext = true;
|
|
enableDecodingColorDepth10Vp9 = true;
|
|
enableHardwareEncoding = true;
|
|
hardwareAccelerationType = "vaapi";
|
|
hardwareDecodingCodecs = [
|
|
"h264"
|
|
"hevc"
|
|
"mpeg2video"
|
|
"vc1"
|
|
"vp8"
|
|
"vp9"
|
|
"av1"
|
|
];
|
|
vaapiDevice = "/dev/dri/renderD128";
|
|
};
|
|
|
|
system = {
|
|
quickConnectAvailable = false;
|
|
trickplayOptions = {
|
|
enableHwAcceleration = true;
|
|
enableHwEncoding = true;
|
|
};
|
|
pluginRepositories = [
|
|
{
|
|
content.Name = "Jellyfin Stable";
|
|
content.Url = "https://repo.jellyfin.org/files/plugin/manifest.json";
|
|
tag = "RepositoryInfo"; # Needed to generate the correct XML
|
|
}
|
|
{
|
|
content.Name = "Intro Skipper";
|
|
content.Url = "https://intro-skipper.org/manifest.json";
|
|
tag = "RepositoryInfo"; # Needed to generate the correct XML
|
|
}
|
|
];
|
|
};
|
|
|
|
libraries = {
|
|
virtualFolders = [
|
|
{
|
|
name = "Movies";
|
|
collectionType = "movies";
|
|
pathInfos = [{ path = "/mnt/media/movies"; }];
|
|
}
|
|
{
|
|
name = "Shows";
|
|
collectionType = "tvshows";
|
|
pathInfos = [{ path = "/mnt/media/shows"; }];
|
|
}
|
|
];
|
|
};
|
|
|
|
users = [
|
|
{
|
|
name = "zachary";
|
|
passwordFile = config.sops.secrets."jellyfin/zachary".path;
|
|
policy = {
|
|
isAdministrator = true;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
bootstrap = {
|
|
enable = true;
|
|
apiKeyFile = config.sops.secrets."jellyfin/jellarr-env".path;
|
|
};
|
|
};
|
|
|
|
services.jellyfin = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
};
|
|
}
|