75 lines
1.6 KiB
Nix
75 lines
1.6 KiB
Nix
{
|
|
vars,
|
|
mysql,
|
|
media,
|
|
...
|
|
}: let
|
|
inherit (vars) timeZone hostName domain;
|
|
datadirs = "smb://${media.host}/kodi/userdata";
|
|
in {
|
|
addons = {
|
|
unknownsources = "true";
|
|
};
|
|
services = {
|
|
devicename = "${hostName}.${domain}";
|
|
webserver = "true";
|
|
webserverauthentication = "false";
|
|
webserverusername = "kodi";
|
|
webserverpassword = "kodi";
|
|
webserverport = "8000";
|
|
webserverssl = "false";
|
|
zeroconf = "true";
|
|
wsdiscovery = "true";
|
|
upnp = "true";
|
|
upnpserver = "true";
|
|
airplay = "true";
|
|
airplayvideosupport = "true";
|
|
};
|
|
locale = {
|
|
language = "resource.language.de_de";
|
|
country = "Deutschland";
|
|
timezone = timeZone;
|
|
};
|
|
lookandfeed = {
|
|
enablerssfeeds = "false";
|
|
};
|
|
videodatabase = {
|
|
inherit (mysql) user pass host;
|
|
type = "mysql";
|
|
port = builtins.toString mysql.port;
|
|
};
|
|
musicdatabase = {
|
|
inherit (mysql) user pass host;
|
|
type = "mysql";
|
|
port = builtins.toString mysql.port;
|
|
};
|
|
videolibrary = {
|
|
importwatchedstate = "true";
|
|
importresumepoint = "true";
|
|
};
|
|
pathsubstitution = {
|
|
substitute = [
|
|
{
|
|
from = "special://profile/playlists/";
|
|
to = "${datadirs}/playlists/";
|
|
}
|
|
{
|
|
from = "special://profile/sources.xml";
|
|
to = "${datadirs}/sources.xml";
|
|
}
|
|
{
|
|
from = "special://profile/mediasources.xml";
|
|
to = "${datadirs}/mediasources.xml";
|
|
}
|
|
{
|
|
from = "special://profile/RssFeeds.xml";
|
|
to = "${datadirs}/RssFeeds.xml";
|
|
}
|
|
{
|
|
from = "special://profile/favourites.xml";
|
|
to = "${datadirs}/favourites.xml";
|
|
}
|
|
];
|
|
};
|
|
}
|