I FORGOT TO FUCKING FORMAT FUUUUUCK
This commit is contained in:
parent
5263873975
commit
c94f5ccb72
|
@ -1,13 +1,13 @@
|
||||||
{ config
|
{
|
||||||
, pkgs
|
config,
|
||||||
, lib
|
pkgs,
|
||||||
, ...
|
lib,
|
||||||
}:
|
...
|
||||||
let
|
}: let
|
||||||
cfg = config.services.declarative-jellyfin;
|
cfg = config.services.declarative-jellyfin;
|
||||||
toXml' = (import ../../lib { nixpkgs = pkgs; }).toXMLGeneric;
|
toXml' = (import ../../lib {nixpkgs = pkgs;}).toXMLGeneric;
|
||||||
in
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
imports = [
|
imports = [
|
||||||
./system.nix
|
./system.nix
|
||||||
./encoding.nix
|
./encoding.nix
|
||||||
|
@ -61,38 +61,34 @@ with lib; {
|
||||||
};
|
};
|
||||||
content = prepass x;
|
content = prepass x;
|
||||||
});
|
});
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
system.activationScripts = {
|
system.activationScripts = {
|
||||||
link-network-xml =
|
link-network-xml =
|
||||||
lib.stringAfter [ "var" ]
|
lib.stringAfter ["var"]
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
storeFile = pkgs.writeText "network.xml" (toXml "NetworkConfiguration" cfg.network);
|
storeFile = pkgs.writeText "network.xml" (toXml "NetworkConfiguration" cfg.network);
|
||||||
in
|
in ''
|
||||||
''
|
|
||||||
mkdir -p "/var/lib/jellyfin/config"
|
mkdir -p "/var/lib/jellyfin/config"
|
||||||
cp -s "${storeFile}" "/var/lib/jellyfin/config/network.xml"
|
cp -s "${storeFile}" "/var/lib/jellyfin/config/network.xml"
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
link-encoding-xml =
|
link-encoding-xml =
|
||||||
lib.stringAfter [ "var" ]
|
lib.stringAfter ["var"]
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
storeFile = pkgs.writeText "encoding.xml" (toXml "EncodingOptions" cfg.network);
|
storeFile = pkgs.writeText "encoding.xml" (toXml "EncodingOptions" cfg.network);
|
||||||
in
|
in ''
|
||||||
''
|
|
||||||
mkdir -p "/var/lib/jellyfin/config"
|
mkdir -p "/var/lib/jellyfin/config"
|
||||||
cp -s "${storeFile}" "/var/lib/jellyfin/config/encoding.xml"
|
cp -s "${storeFile}" "/var/lib/jellyfin/config/encoding.xml"
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
link-system-xml =
|
link-system-xml =
|
||||||
lib.stringAfter [ "var" ]
|
lib.stringAfter ["var"]
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
storeFile = pkgs.writeText "system.xml" (toXml "ServerConfiguration" cfg.network);
|
storeFile = pkgs.writeText "system.xml" (toXml "ServerConfiguration" cfg.network);
|
||||||
in
|
in ''
|
||||||
''
|
|
||||||
mkdir -p "/var/lib/jellyfin/config"
|
mkdir -p "/var/lib/jellyfin/config"
|
||||||
cp -s "${storeFile}" "/var/lib/jellyfin/config/system.xml"
|
cp -s "${storeFile}" "/var/lib/jellyfin/config/system.xml"
|
||||||
''
|
''
|
||||||
|
@ -100,4 +96,4 @@ with lib; {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
mkStrOption = default: description: { type = types.str; inherit default description; };
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
mkStrOption = default: description: {
|
||||||
|
type = types.str;
|
||||||
|
inherit default description;
|
||||||
|
};
|
||||||
|
in {
|
||||||
options.services.declarative-jellyfin.system = {
|
options.services.declarative-jellyfin.system = {
|
||||||
ServerName = mkStrOption config.networking.hostName ''
|
ServerName = mkStrOption config.networking.hostName ''
|
||||||
This name will be used to identify the server and will default to the server's hostname.
|
This name will be used to identify the server and will default to the server's hostname.
|
||||||
|
@ -152,7 +157,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
ImageSavingConvention = mkOption {
|
ImageSavingConvention = mkOption {
|
||||||
type = types.enum [ "Legacy" ];
|
type = types.enum ["Legacy"];
|
||||||
default = "Legacy";
|
default = "Legacy";
|
||||||
description = "i got no idea what this is";
|
description = "i got no idea what this is";
|
||||||
};
|
};
|
||||||
|
@ -164,96 +169,96 @@ in
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "Movie";
|
ItemType = "Movie";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ ];
|
DisabledMetadataFetchers = [];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ ];
|
DisabledImageFetchers = [];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "MusicVideo";
|
ItemType = "MusicVideo";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ "The Open Movie Database" ];
|
DisabledMetadataFetchers = ["The Open Movie Database"];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ "The Open Movie Database" ];
|
DisabledImageFetchers = ["The Open Movie Database"];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "Series";
|
ItemType = "Series";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ ];
|
DisabledMetadataFetchers = [];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ ];
|
DisabledImageFetchers = [];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "MusicAlbum";
|
ItemType = "MusicAlbum";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ "TheAudioDB" ];
|
DisabledMetadataFetchers = ["TheAudioDB"];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ ];
|
DisabledImageFetchers = [];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "MusicArtist";
|
ItemType = "MusicArtist";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ "TheAudioDB" ];
|
DisabledMetadataFetchers = ["TheAudioDB"];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ ];
|
DisabledImageFetchers = [];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "BoxSet";
|
ItemType = "BoxSet";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ ];
|
DisabledMetadataFetchers = [];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ ];
|
DisabledImageFetchers = [];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "Season";
|
ItemType = "Season";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ ];
|
DisabledMetadataFetchers = [];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ ];
|
DisabledImageFetchers = [];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
tag = "MetadataOptions";
|
tag = "MetadataOptions";
|
||||||
content = {
|
content = {
|
||||||
ItemType = "Episode";
|
ItemType = "Episode";
|
||||||
DisabledMetadataSavers = [ ];
|
DisabledMetadataSavers = [];
|
||||||
DisabledMetadataFetchers = [ ];
|
DisabledMetadataFetchers = [];
|
||||||
LocalMetadataReaderOrder = [ ];
|
LocalMetadataReaderOrder = [];
|
||||||
MetadataFetcherOrder = [ ];
|
MetadataFetcherOrder = [];
|
||||||
DisabledImageFetchers = [ ];
|
DisabledImageFetchers = [];
|
||||||
ImageFetcherOrder = [ ];
|
ImageFetcherOrder = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -273,7 +278,7 @@ in
|
||||||
|
|
||||||
ContentTypes = mkOption {
|
ContentTypes = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [ ];
|
default = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
RemoteClientBitrateLimit = mkOption {
|
RemoteClientBitrateLimit = mkOption {
|
||||||
|
@ -292,7 +297,7 @@ in
|
||||||
|
|
||||||
CodecsUsed = mkOption {
|
CodecsUsed = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [ ];
|
default = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
PluginRepositories = mkOption {
|
PluginRepositories = mkOption {
|
||||||
|
@ -322,7 +327,7 @@ in
|
||||||
|
|
||||||
PathSubstitutions = mkOption {
|
PathSubstitutions = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf str;
|
||||||
default = [ ];
|
default = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
EnableSlowResponseWarning = mkOption {
|
EnableSlowResponseWarning = mkOption {
|
||||||
|
@ -368,9 +373,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
RemoveOldPlugins = mkOption { type = types.bool; default = true; };
|
RemoveOldPlugins = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
AllowClientLogUpload = mkOption { type = types.bool; default = true; };
|
AllowClientLogUpload = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
DummyChapterDuration = mkOption {
|
DummyChapterDuration = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
|
@ -436,7 +447,7 @@ in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ScanBehavior = mkOption {
|
ScanBehavior = mkOption {
|
||||||
type = types.enum [ "NonBlocking" "Blocking" ];
|
type = types.enum ["NonBlocking" "Blocking"];
|
||||||
default = "NonBlocking";
|
default = "NonBlocking";
|
||||||
description = ''
|
description = ''
|
||||||
The default behavior is non blocking, which will add media to the library before trickplay generation is done. Blocking will ensure trickplay files are generated before media is added to the library, but will make scans significantly longer.
|
The default behavior is non blocking, which will add media to the library before trickplay generation is done. Blocking will ensure trickplay files are generated before media is added to the library, but will make scans significantly longer.
|
||||||
|
|
Loading…
Reference in a new issue