@@ -0,0 +1,132 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
inherit (hmConfig.virtualisation.quadlet) volumes networks;
|
||||
autheliaClientId = "59TRpNutxEeRRCAZbDsK7rsnrA5NC69HAdAO45CEfc740xl4hgIacDy2u03oiFc89Exb67udBQvmfwxgeAQtJPiNAJxA5OzGmdQf";
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops = {
|
||||
secrets = {
|
||||
"jellyfin/admin".sopsFile = ../../../../../../secrets/secrets.yaml;
|
||||
"jellyfin/authelia/password".sopsFile = ../../../../../../secrets/secrets.yaml;
|
||||
"jellyfin/authelia/digest".sopsFile = ../../../../../../secrets/secrets.yaml;
|
||||
};
|
||||
|
||||
templates = {
|
||||
jellyfin-env.content = ''
|
||||
JELLYFIN_ADMIN_PASSWORD=${hmConfig.sops.placeholder."jellyfin/admin"}
|
||||
JELLYFIN_OIDC_SECRET=${hmConfig.sops.placeholder."jellyfin/authelia/password"}
|
||||
'';
|
||||
|
||||
authelia-jellyfin.content = builtins.readFile (
|
||||
(pkgs.formats.yaml { }).generate "jellyfin.yaml" {
|
||||
identity_providers.oidc = {
|
||||
authorization_policies.jellyfin = {
|
||||
default_policy = "deny";
|
||||
rules = [
|
||||
{
|
||||
policy = "one_factor";
|
||||
subject = "group:jellyfin";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
clients = [
|
||||
{
|
||||
client_id = autheliaClientId;
|
||||
client_name = "Jellyfin";
|
||||
client_secret = hmConfig.sops.placeholder."jellyfin/authelia/digest";
|
||||
redirect_uris = [ "https://media.karaolidis.com/sso/OID/redirect/authelia" ];
|
||||
authorization_policy = "jellyfin";
|
||||
require_pkce = true;
|
||||
pkce_challenge_method = "S256";
|
||||
scopes = [
|
||||
"openid"
|
||||
"profile"
|
||||
"groups"
|
||||
];
|
||||
token_endpoint_auth_method = "client_secret_post";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = [
|
||||
"d /mnt/storage/private/storm/containers/storage/volumes/media/_data 700 storm storm"
|
||||
"d /mnt/storage/private/storm/containers/storage/volumes/media/_data/films 755 storm storm"
|
||||
"d /mnt/storage/private/storm/containers/storage/volumes/media/_data/shows 755 storm storm"
|
||||
"d /mnt/storage/private/storm/containers/storage/volumes/media/_data/anime-films 755 storm storm"
|
||||
"d /mnt/storage/private/storm/containers/storage/volumes/media/_data/anime-shows 755 storm storm"
|
||||
"d /mnt/storage/private/storm/containers/storage/volumes/media/_data/music 755 storm storm"
|
||||
];
|
||||
|
||||
virtualisation.quadlet = {
|
||||
networks.jellyfin = { };
|
||||
|
||||
volumes = {
|
||||
jellyfin-config = { };
|
||||
jellyfin-data = { };
|
||||
jellyfin-log = { };
|
||||
jellyfin-cache = { };
|
||||
};
|
||||
|
||||
containers = {
|
||||
jellyfin = {
|
||||
containerConfig = {
|
||||
image = "docker-archive:${selfPkgs.docker-jellyfin}";
|
||||
networks = [
|
||||
networks.jellyfin.ref
|
||||
networks.traefik.ref
|
||||
];
|
||||
volumes =
|
||||
let
|
||||
setup = pkgs.writeTextFile {
|
||||
name = "setup.sh";
|
||||
executable = true;
|
||||
text = builtins.readFile ./setup.sh;
|
||||
};
|
||||
in
|
||||
[
|
||||
"/mnt/storage/private/storm/containers/storage/volumes/media/_data:/var/lib/media"
|
||||
"${setup}:/etc/jellyfin/setup.sh:ro"
|
||||
"${./libraries}:/etc/jellyfin/libraries:ro"
|
||||
"${volumes.jellyfin-config.ref}:/etc/jellyfin"
|
||||
"${volumes.jellyfin-data.ref}:/var/lib/jellyfin"
|
||||
"${volumes.jellyfin-log.ref}:/var/log/jellyfin"
|
||||
"${volumes.jellyfin-cache.ref}:/tmp/jellyfin"
|
||||
];
|
||||
environments.JELLYFIN_OIDC_CLIENT_ID = autheliaClientId;
|
||||
environmentFiles = [ hmConfig.sops.templates.jellyfin-env.path ];
|
||||
labels = [
|
||||
"traefik.enable=true"
|
||||
"traefik.http.routers.jellyfin.rule=Host(`media.karaolidis.com`)"
|
||||
];
|
||||
podmanArgs = [ "--cdi-spec-dir=/run/cdi" ];
|
||||
devices = [ "nvidia.com/gpu=all" ];
|
||||
};
|
||||
|
||||
unitConfig.After = [ "sops-nix.service" ];
|
||||
};
|
||||
|
||||
authelia-init.containerConfig.volumes = [
|
||||
"${hmConfig.sops.templates.authelia-jellyfin.path}:/etc/authelia/conf.d/jellyfin.yaml:ro"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"LibraryOptions": {
|
||||
"Enabled": true,
|
||||
"EnableArchiveMediaFiles": false,
|
||||
"EnablePhotos": true,
|
||||
"EnableRealtimeMonitor": true,
|
||||
"EnableLUFSScan": true,
|
||||
"ExtractTrickplayImagesDuringLibraryScan": false,
|
||||
"SaveTrickplayWithMedia": true,
|
||||
"EnableTrickplayImageExtraction": true,
|
||||
"ExtractChapterImagesDuringLibraryScan": false,
|
||||
"EnableChapterImageExtraction": true,
|
||||
"EnableInternetProviders": true,
|
||||
"SaveLocalMetadata": true,
|
||||
"EnableAutomaticSeriesGrouping": false,
|
||||
"PreferredMetadataLanguage": "en",
|
||||
"MetadataCountryCode": "JP",
|
||||
"SeasonZeroDisplayName": "Specials",
|
||||
"AutomaticRefreshIntervalDays": 30,
|
||||
"EnableEmbeddedTitles": false,
|
||||
"EnableEmbeddedExtrasTitles": false,
|
||||
"EnableEmbeddedEpisodeInfos": false,
|
||||
"AllowEmbeddedSubtitles": "AllowAll",
|
||||
"SkipSubtitlesIfEmbeddedSubtitlesPresent": false,
|
||||
"SkipSubtitlesIfAudioTrackMatches": false,
|
||||
"SaveSubtitlesWithMedia": true,
|
||||
"SaveLyricsWithMedia": false,
|
||||
"RequirePerfectSubtitleMatch": true,
|
||||
"AutomaticallyAddToCollection": true,
|
||||
"PreferNonstandardArtistsTag": false,
|
||||
"UseCustomTagDelimiters": false,
|
||||
"MetadataSavers": ["Nfo"],
|
||||
"TypeOptions": [
|
||||
{
|
||||
"Type": "Movie",
|
||||
"MetadataFetchers": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB"
|
||||
],
|
||||
"MetadataFetcherOrder": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB"
|
||||
],
|
||||
"ImageFetchers": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
],
|
||||
"ImageFetcherOrder": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "1",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"LocalMetadataReaderOrder": ["Nfo"],
|
||||
"SubtitleDownloadLanguages": [],
|
||||
"CustomTagDelimiters": ["/", "|", ";", "\\"],
|
||||
"DelimiterWhitelist": [],
|
||||
"DisabledSubtitleFetchers": [],
|
||||
"SubtitleFetcherOrder": [],
|
||||
"DisabledLyricFetchers": [],
|
||||
"LyricFetcherOrder": [],
|
||||
"PathInfos": [
|
||||
{
|
||||
"Path": "/var/lib/media/anime-films"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -0,0 +1,128 @@
|
||||
{
|
||||
"LibraryOptions": {
|
||||
"Enabled": true,
|
||||
"EnableArchiveMediaFiles": false,
|
||||
"EnablePhotos": true,
|
||||
"EnableRealtimeMonitor": true,
|
||||
"EnableLUFSScan": true,
|
||||
"ExtractTrickplayImagesDuringLibraryScan": false,
|
||||
"SaveTrickplayWithMedia": true,
|
||||
"EnableTrickplayImageExtraction": true,
|
||||
"ExtractChapterImagesDuringLibraryScan": false,
|
||||
"EnableChapterImageExtraction": true,
|
||||
"EnableInternetProviders": true,
|
||||
"SaveLocalMetadata": true,
|
||||
"EnableAutomaticSeriesGrouping": false,
|
||||
"PreferredMetadataLanguage": "en",
|
||||
"MetadataCountryCode": "US",
|
||||
"SeasonZeroDisplayName": "Specials",
|
||||
"AutomaticRefreshIntervalDays": 30,
|
||||
"EnableEmbeddedTitles": false,
|
||||
"EnableEmbeddedExtrasTitles": false,
|
||||
"EnableEmbeddedEpisodeInfos": false,
|
||||
"AllowEmbeddedSubtitles": "AllowAll",
|
||||
"SkipSubtitlesIfEmbeddedSubtitlesPresent": false,
|
||||
"SkipSubtitlesIfAudioTrackMatches": false,
|
||||
"SaveSubtitlesWithMedia": true,
|
||||
"SaveLyricsWithMedia": false,
|
||||
"RequirePerfectSubtitleMatch": true,
|
||||
"AutomaticallyAddToCollection": true,
|
||||
"PreferNonstandardArtistsTag": false,
|
||||
"UseCustomTagDelimiters": false,
|
||||
"MetadataSavers": ["Nfo"],
|
||||
"TypeOptions": [
|
||||
{
|
||||
"Type": "Movie",
|
||||
"MetadataFetchers": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB"
|
||||
],
|
||||
"MetadataFetcherOrder": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB"
|
||||
],
|
||||
"ImageFetchers": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
],
|
||||
"ImageFetcherOrder": [
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"TheTVDB",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "1",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"LocalMetadataReaderOrder": ["Nfo"],
|
||||
"SubtitleDownloadLanguages": [],
|
||||
"CustomTagDelimiters": ["/", "|", ";", "\\"],
|
||||
"DelimiterWhitelist": [],
|
||||
"DisabledSubtitleFetchers": [],
|
||||
"SubtitleFetcherOrder": [],
|
||||
"DisabledLyricFetchers": [],
|
||||
"LyricFetcherOrder": [],
|
||||
"PathInfos": [
|
||||
{
|
||||
"Path": "/var/lib/media/films"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -0,0 +1,229 @@
|
||||
{
|
||||
"LibraryOptions": {
|
||||
"Enabled": true,
|
||||
"EnableArchiveMediaFiles": false,
|
||||
"EnablePhotos": true,
|
||||
"EnableRealtimeMonitor": true,
|
||||
"EnableLUFSScan": true,
|
||||
"ExtractTrickplayImagesDuringLibraryScan": false,
|
||||
"SaveTrickplayWithMedia": false,
|
||||
"EnableTrickplayImageExtraction": false,
|
||||
"ExtractChapterImagesDuringLibraryScan": false,
|
||||
"EnableChapterImageExtraction": false,
|
||||
"EnableInternetProviders": true,
|
||||
"SaveLocalMetadata": true,
|
||||
"EnableAutomaticSeriesGrouping": false,
|
||||
"PreferredMetadataLanguage": "en",
|
||||
"MetadataCountryCode": "US",
|
||||
"SeasonZeroDisplayName": "Specials",
|
||||
"AutomaticRefreshIntervalDays": 30,
|
||||
"EnableEmbeddedTitles": false,
|
||||
"EnableEmbeddedExtrasTitles": false,
|
||||
"EnableEmbeddedEpisodeInfos": false,
|
||||
"AllowEmbeddedSubtitles": "AllowAll",
|
||||
"SkipSubtitlesIfEmbeddedSubtitlesPresent": false,
|
||||
"SkipSubtitlesIfAudioTrackMatches": false,
|
||||
"SaveSubtitlesWithMedia": true,
|
||||
"SaveLyricsWithMedia": true,
|
||||
"RequirePerfectSubtitleMatch": true,
|
||||
"AutomaticallyAddToCollection": false,
|
||||
"PreferNonstandardArtistsTag": false,
|
||||
"UseCustomTagDelimiters": false,
|
||||
"MetadataSavers": ["Nfo"],
|
||||
"TypeOptions": [
|
||||
{
|
||||
"Type": "MusicArtist",
|
||||
"MetadataFetchers": ["MusicBrainz", "TheAudioDB"],
|
||||
"MetadataFetcherOrder": ["MusicBrainz", "TheAudioDB"],
|
||||
"ImageFetchers": ["TheAudioDB"],
|
||||
"ImageFetcherOrder": ["TheAudioDB"],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "1",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Type": "MusicAlbum",
|
||||
"MetadataFetchers": ["MusicBrainz", "TheAudioDB"],
|
||||
"MetadataFetcherOrder": ["MusicBrainz", "TheAudioDB"],
|
||||
"ImageFetchers": ["TheAudioDB"],
|
||||
"ImageFetcherOrder": ["TheAudioDB"],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "0",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Type": "Audio",
|
||||
"ImageFetchers": ["Image Extractor"],
|
||||
"ImageFetcherOrder": ["Image Extractor"]
|
||||
},
|
||||
{
|
||||
"Type": "MusicVideo",
|
||||
"ImageFetchers": ["Embedded Image Extractor", "Screen Grabber"],
|
||||
"ImageFetcherOrder": ["Embedded Image Extractor", "Screen Grabber"],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "1",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"LocalMetadataReaderOrder": ["Nfo"],
|
||||
"SubtitleDownloadLanguages": [],
|
||||
"CustomTagDelimiters": ["/", "|", ";", "\\"],
|
||||
"DelimiterWhitelist": [],
|
||||
"DisabledSubtitleFetchers": [],
|
||||
"SubtitleFetcherOrder": [],
|
||||
"DisabledLyricFetchers": [],
|
||||
"LyricFetcherOrder": [],
|
||||
"PathInfos": [
|
||||
{
|
||||
"Path": "/var/lib/media/music"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"LibraryOptions": {
|
||||
"Enabled": true,
|
||||
"EnableArchiveMediaFiles": false,
|
||||
"EnablePhotos": true,
|
||||
"EnableRealtimeMonitor": true,
|
||||
"EnableLUFSScan": true,
|
||||
"ExtractTrickplayImagesDuringLibraryScan": false,
|
||||
"SaveTrickplayWithMedia": true,
|
||||
"EnableTrickplayImageExtraction": true,
|
||||
"ExtractChapterImagesDuringLibraryScan": false,
|
||||
"EnableChapterImageExtraction": true,
|
||||
"EnableInternetProviders": true,
|
||||
"SaveLocalMetadata": true,
|
||||
"EnableAutomaticSeriesGrouping": true,
|
||||
"PreferredMetadataLanguage": "en",
|
||||
"MetadataCountryCode": "JP",
|
||||
"SeasonZeroDisplayName": "Specials",
|
||||
"AutomaticRefreshIntervalDays": 30,
|
||||
"EnableEmbeddedTitles": false,
|
||||
"EnableEmbeddedExtrasTitles": false,
|
||||
"EnableEmbeddedEpisodeInfos": false,
|
||||
"AllowEmbeddedSubtitles": "AllowAll",
|
||||
"SkipSubtitlesIfEmbeddedSubtitlesPresent": false,
|
||||
"SkipSubtitlesIfAudioTrackMatches": false,
|
||||
"SaveSubtitlesWithMedia": true,
|
||||
"SaveLyricsWithMedia": false,
|
||||
"RequirePerfectSubtitleMatch": true,
|
||||
"AutomaticallyAddToCollection": false,
|
||||
"PreferNonstandardArtistsTag": false,
|
||||
"UseCustomTagDelimiters": false,
|
||||
"MetadataSavers": ["Nfo"],
|
||||
"TypeOptions": [
|
||||
{
|
||||
"Type": "Series",
|
||||
"MetadataFetchers": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Missing Episode Fetcher"
|
||||
],
|
||||
"MetadataFetcherOrder": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Missing Episode Fetcher"
|
||||
],
|
||||
"ImageFetchers": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageFetcherOrder": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "1",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Type": "Season",
|
||||
"MetadataFetchers": ["TheTVDB", "TheMovieDb"],
|
||||
"MetadataFetcherOrder": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageFetchers": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageFetcherOrder": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "0",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Type": "Episode",
|
||||
"MetadataFetchers": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database"
|
||||
],
|
||||
"MetadataFetcherOrder": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database"
|
||||
],
|
||||
"ImageFetchers": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
],
|
||||
"ImageFetcherOrder": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
]
|
||||
}
|
||||
],
|
||||
"LocalMetadataReaderOrder": ["Nfo"],
|
||||
"SubtitleDownloadLanguages": [],
|
||||
"CustomTagDelimiters": ["/", "|", ";", "\\"],
|
||||
"DelimiterWhitelist": [],
|
||||
"DisabledSubtitleFetchers": [],
|
||||
"SubtitleFetcherOrder": [],
|
||||
"DisabledLyricFetchers": [],
|
||||
"LyricFetcherOrder": [],
|
||||
"PathInfos": [
|
||||
{
|
||||
"Path": "/var/lib/media/anime-shows"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -0,0 +1,204 @@
|
||||
{
|
||||
"LibraryOptions": {
|
||||
"Enabled": true,
|
||||
"EnableArchiveMediaFiles": false,
|
||||
"EnablePhotos": true,
|
||||
"EnableRealtimeMonitor": true,
|
||||
"EnableLUFSScan": true,
|
||||
"ExtractTrickplayImagesDuringLibraryScan": false,
|
||||
"SaveTrickplayWithMedia": true,
|
||||
"EnableTrickplayImageExtraction": true,
|
||||
"ExtractChapterImagesDuringLibraryScan": false,
|
||||
"EnableChapterImageExtraction": true,
|
||||
"EnableInternetProviders": true,
|
||||
"SaveLocalMetadata": true,
|
||||
"EnableAutomaticSeriesGrouping": true,
|
||||
"PreferredMetadataLanguage": "en",
|
||||
"MetadataCountryCode": "US",
|
||||
"SeasonZeroDisplayName": "Specials",
|
||||
"AutomaticRefreshIntervalDays": 30,
|
||||
"EnableEmbeddedTitles": false,
|
||||
"EnableEmbeddedExtrasTitles": false,
|
||||
"EnableEmbeddedEpisodeInfos": false,
|
||||
"AllowEmbeddedSubtitles": "AllowAll",
|
||||
"SkipSubtitlesIfEmbeddedSubtitlesPresent": false,
|
||||
"SkipSubtitlesIfAudioTrackMatches": false,
|
||||
"SaveSubtitlesWithMedia": true,
|
||||
"SaveLyricsWithMedia": false,
|
||||
"RequirePerfectSubtitleMatch": true,
|
||||
"AutomaticallyAddToCollection": false,
|
||||
"PreferNonstandardArtistsTag": false,
|
||||
"UseCustomTagDelimiters": false,
|
||||
"MetadataSavers": ["Nfo"],
|
||||
"TypeOptions": [
|
||||
{
|
||||
"Type": "Series",
|
||||
"MetadataFetchers": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Missing Episode Fetcher"
|
||||
],
|
||||
"MetadataFetcherOrder": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Missing Episode Fetcher"
|
||||
],
|
||||
"ImageFetchers": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageFetcherOrder": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "1",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Type": "Season",
|
||||
"MetadataFetchers": ["TheTVDB", "TheMovieDb"],
|
||||
"MetadataFetcherOrder": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageFetchers": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageFetcherOrder": ["TheTVDB", "TheMovieDb"],
|
||||
"ImageOptions": [
|
||||
{
|
||||
"Type": "Primary",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Art",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "BoxRear",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Banner",
|
||||
"Limit": 1,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Box",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Disc",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Logo",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Menu",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Thumb",
|
||||
"Limit": 0,
|
||||
"MinWidth": 0
|
||||
},
|
||||
{
|
||||
"Type": "Backdrop",
|
||||
"Limit": "0",
|
||||
"MinWidth": "1280"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Type": "Episode",
|
||||
"MetadataFetchers": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database"
|
||||
],
|
||||
"MetadataFetcherOrder": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database"
|
||||
],
|
||||
"ImageFetchers": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
],
|
||||
"ImageFetcherOrder": [
|
||||
"TheTVDB",
|
||||
"TheMovieDb",
|
||||
"The Open Movie Database",
|
||||
"Embedded Image Extractor",
|
||||
"Screen Grabber"
|
||||
]
|
||||
}
|
||||
],
|
||||
"LocalMetadataReaderOrder": ["Nfo"],
|
||||
"SubtitleDownloadLanguages": [],
|
||||
"CustomTagDelimiters": ["/", "|", ";", "\\"],
|
||||
"DelimiterWhitelist": [],
|
||||
"DisabledSubtitleFetchers": [],
|
||||
"SubtitleFetcherOrder": [],
|
||||
"DisabledLyricFetchers": [],
|
||||
"LyricFetcherOrder": [],
|
||||
"PathInfos": [
|
||||
{
|
||||
"Path": "/var/lib/media/shows"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
@@ -0,0 +1,182 @@
|
||||
# shellcheck shell=sh
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/Startup/Configuration" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{"UICulture":"en-US","MetadataCountryCode":"US","PreferredMetadataLanguage":"en"}'
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/Startup/User"
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/Startup/User" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{"Name":"'"$JELLYFIN_ADMIN_USERNAME"'","Password":"'"$JELLYFIN_ADMIN_PASSWORD"'"}'
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/Startup/RemoteAccess" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{"EnableRemoteAccess":true,"EnableAutomaticPortMapping":false}'
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/Startup/Complete" \
|
||||
-X POST
|
||||
|
||||
token="$(curl -sf "$JELLYFIN_HOST/Users/AuthenticateByName" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: MediaBrowser Client="jellyfin-init", Device="sh", DeviceId="sh", Version="1.0"' \
|
||||
--data-raw '{"Username":"'"$JELLYFIN_ADMIN_USERNAME"'","Pw":"'"$JELLYFIN_ADMIN_PASSWORD"'"}' \
|
||||
| jq -r '.AccessToken')"
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/System/Configuration" \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
| jq '.EnableMetrics = true
|
||||
| .ServerName = "jupiter"
|
||||
| .EnableGroupingIntoCollections = true
|
||||
| .RemoteClientBitrateLimit = 1024000000
|
||||
| .TrickplayOptions.EnableHwAcceleration = true
|
||||
| .TrickplayOptions.EnableHwEncoding = true' \
|
||||
| curl -sf "$JELLYFIN_HOST/System/Configuration" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
--data-binary @-
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/System/Configuration/encoding" \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
| jq '.EnableThrottling = true
|
||||
| .HardwareAccelerationType = "nvenc"
|
||||
| .EnableTonemapping = true
|
||||
| .EnableDecodingColorDepth12HevcRext = true
|
||||
| .AllowHevcEncoding = true
|
||||
| .HardwareDecodingCodecs = ["h264", "hevc", "mpeg2video", "mpeg4", "vc1", "vp8", "vp9", "av1"]' \
|
||||
| curl -sf "$JELLYFIN_HOST/System/Configuration/encoding" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
--data-binary @-
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/Plugins/c83d86bb-a1e0-4c35-a113-e2101cf4ee6b/Configuration" \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
| jq '.AnalyzeSeasonZero = true
|
||||
| .AnalyzeMovies = true' \
|
||||
| curl -sf "$JELLYFIN_HOST/Plugins/c83d86bb-a1e0-4c35-a113-e2101cf4ee6b/Configuration" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
--data-binary @-
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/Plugins/b8715ed1-6c47-4528-9ad3-f72deb539cd4/Configuration" \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
| jq '.IncludeAdult = true' \
|
||||
| curl -sf "$JELLYFIN_HOST/Plugins/b8715ed1-6c47-4528-9ad3-f72deb539cd4/Configuration" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
--data-binary @-
|
||||
|
||||
for filepath in /etc/jellyfin/libraries/*/*.json; do
|
||||
collectionType=$(jq -rn --arg s "$(basename "$(dirname "$filepath")")" '$s|@uri')
|
||||
name=$(jq -rn --arg s "$(basename "$filepath" .json)" '$s|@uri')
|
||||
|
||||
curl -sf "${JELLYFIN_HOST}/Library/VirtualFolders?collectionType=${collectionType}&name=${name}" \
|
||||
-X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
--data-binary @"${filepath}"
|
||||
done
|
||||
|
||||
curl -sf "${JELLYFIN_HOST}/Plugins/505ce9d1-d916-42fa-86ca-673ef241d7df/Configuration" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: MediaBrowser Token="'"$token"'"' \
|
||||
--data-binary @- <<EOF
|
||||
{
|
||||
"SamlConfigs": {},
|
||||
"OidConfigs": {
|
||||
"authelia": {
|
||||
"OidProviderName": "authelia",
|
||||
"OidEndpoint": "https://id.karaolidis.com",
|
||||
"OidClientId": "$JELLYFIN_OIDC_CLIENT_ID",
|
||||
"OidSecret": "$JELLYFIN_OIDC_SECRET",
|
||||
"RoleClaim": "groups",
|
||||
"DefaultUsernameClaim": "preferred_username",
|
||||
"Enabled": true,
|
||||
"EnableAuthorization": true,
|
||||
"EnableAllFolders": true,
|
||||
"EnableFolderRoles": false,
|
||||
"EnableLiveTvRoles": false,
|
||||
"EnableLiveTv": false,
|
||||
"EnableLiveTvManagement": false,
|
||||
"DisableHttps": false,
|
||||
"DoNotValidateEndpoints": false,
|
||||
"DoNotValidateIssuerName": false,
|
||||
"Roles": [
|
||||
"jellyfin"
|
||||
],
|
||||
"AdminRoles": [
|
||||
"admin"
|
||||
],
|
||||
"LiveTvRoles": [],
|
||||
"LiveTvManagementRoles": [],
|
||||
"OidScopes": [
|
||||
"groups"
|
||||
],
|
||||
"EnabledFolders": [],
|
||||
"FolderRoleMapping": [],
|
||||
"SchemeOverride": "https"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
# https://github.com/9p4/jellyfin-plugin-sso/issues/16#issuecomment-2953811762
|
||||
custom_css=$(cat <<EOF
|
||||
a.raised.emby-button,
|
||||
.loginDisclaimerContainer,
|
||||
.loginDisclaimer,
|
||||
.manualLoginForm {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
.btnQuick,
|
||||
.btnSelectServer,
|
||||
.btnForgotPassword,
|
||||
a.raised.emby-button,
|
||||
.emby-button.block,
|
||||
.loginDisclaimerContainer,
|
||||
.loginDisclaimer {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 1em;
|
||||
color: inherit !important;
|
||||
}
|
||||
|
||||
.btnForgotPassword {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.manualLoginForm > :not(:first-child) {
|
||||
display: none !important;
|
||||
}
|
||||
EOF
|
||||
)
|
||||
|
||||
login_disclaimer=$(cat <<EOF
|
||||
<form action="https://media.karaolidis.com/sso/OID/start/authelia">
|
||||
<button class="raised block emby-button button-submit">
|
||||
Sign in with Authelia
|
||||
</button>
|
||||
</form>
|
||||
EOF
|
||||
)
|
||||
|
||||
curl -sf "$JELLYFIN_HOST/System/Configuration/branding" \
|
||||
-H "Authorization: MediaBrowser Token=$token" |
|
||||
jq --arg custom_css "$custom_css" \
|
||||
--arg login_disclaimer "$login_disclaimer" \
|
||||
'.CustomCss = $custom_css | .LoginDisclaimer = $login_disclaimer' |
|
||||
curl -sf "$JELLYFIN_HOST/System/Configuration/branding" \
|
||||
-X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H "Authorization: MediaBrowser Token=$token" \
|
||||
--data-binary @-
|
Reference in New Issue
Block a user