add debug logging option to jellyfin
This commit is contained in:
parent
94474145be
commit
b603156930
2 changed files with 29 additions and 1 deletions
|
|
@ -32,6 +32,12 @@ in
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
debug = lib.mkOption {
|
||||||
|
description = "Enable debug logging";
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
};
|
||||||
|
|
||||||
ldap = lib.mkOption {
|
ldap = lib.mkOption {
|
||||||
description = "LDAP configuration.";
|
description = "LDAP configuration.";
|
||||||
default = {};
|
default = {};
|
||||||
|
|
@ -419,8 +425,29 @@ in
|
||||||
<SplashscreenEnabled>true</SplashscreenEnabled>
|
<SplashscreenEnabled>true</SplashscreenEnabled>
|
||||||
</BrandingOptions>
|
</BrandingOptions>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
debugLogging = pkgs.writeText "debugLogging.json" ''
|
||||||
|
{
|
||||||
|
"Serilog": {
|
||||||
|
"MinimumLevel": {
|
||||||
|
"Default": "Debug",
|
||||||
|
"Override": {
|
||||||
|
"": "Debug"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
lib.strings.optionalString cfg.ldap.enable (shblib.replaceSecretsScript {
|
lib.strings.optionalString cfg.debug
|
||||||
|
''
|
||||||
|
if [ -f "${config.services.jellyfin.configDir}/logging.json" ] && [ ! -L "${config.services.jellyfin.configDir}/logging.json" ]; then
|
||||||
|
echo "A ${config.services.jellyfin.configDir}/logging.json file exists already, this indicates probably an existing installation. Please remove it before continuing."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
ln -fs "${debugLogging}" "${config.services.jellyfin.configDir}/logging.json"
|
||||||
|
''
|
||||||
|
+ lib.strings.optionalString cfg.ldap.enable (shblib.replaceSecretsScript {
|
||||||
file = ldapConfig;
|
file = ldapConfig;
|
||||||
resultPath = "/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml";
|
resultPath = "/var/lib/jellyfin/plugins/configurations/LDAP-Auth.xml";
|
||||||
replacements = [
|
replacements = [
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ let
|
||||||
shb.jellyfin = {
|
shb.jellyfin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit (config.test) subdomain domain;
|
inherit (config.test) subdomain domain;
|
||||||
|
debug = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue