176 lines
4.2 KiB
Nix
176 lines
4.2 KiB
Nix
{ config, lib, ... }:
|
|
{
|
|
audiobookshelf =
|
|
let
|
|
cfg = config.my.servers.audiobookshelf;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
inherit (cfg) url;
|
|
type = cfg.name;
|
|
key = "{{HOMEPAGE_VAR_AUDIOBOOKSHELF}}";
|
|
};
|
|
};
|
|
jellyfin =
|
|
let
|
|
cfg = config.my.servers.jellyfin;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
inherit (cfg) url;
|
|
type = cfg.name;
|
|
key = "{{HOMEPAGE_VAR_JELLYFIN}}";
|
|
enableUser = true;
|
|
enableBlocks = true;
|
|
enableNowPlaying = false;
|
|
};
|
|
};
|
|
"now playing" =
|
|
let
|
|
cfg = config.my.servers.jellyfin;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
inherit (cfg) url;
|
|
type = cfg.name;
|
|
key = "{{HOMEPAGE_VAR_JELLYFIN}}";
|
|
enableUser = true;
|
|
enableBlocks = false;
|
|
enableNowPlaying = true;
|
|
showEpisodeNumber = true;
|
|
expandOneStreamToTwoRows = true;
|
|
};
|
|
};
|
|
sonarr =
|
|
let
|
|
cfg = config.my.servers.sonarr;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
inherit (cfg) url;
|
|
type = cfg.name;
|
|
key = "{{HOMEPAGE_VAR_SONARR}}";
|
|
enableQueue = true;
|
|
};
|
|
};
|
|
radarr =
|
|
let
|
|
cfg = config.my.servers.radarr;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
inherit (cfg) url;
|
|
type = cfg.name;
|
|
key = "{{HOMEPAGE_VAR_RADARR}}";
|
|
enableQueue = true;
|
|
};
|
|
};
|
|
lidarr =
|
|
let
|
|
cfg = config.my.servers.lidarr;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
inherit (cfg) url;
|
|
type = cfg.name;
|
|
key = "{{HOMEPAGE_VAR_LIDARR}}";
|
|
};
|
|
};
|
|
prowlarr =
|
|
let
|
|
cfg = config.my.servers.prowlarr;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
type = cfg.name;
|
|
inherit (cfg) url;
|
|
key = "{{HOMEPAGE_VAR_PROWLARR}}";
|
|
};
|
|
};
|
|
bazarr =
|
|
let
|
|
cfg = config.my.servers.bazarr;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
type = cfg.name;
|
|
inherit (cfg) url;
|
|
key = "{{HOMEPAGE_VAR_BAZARR}}";
|
|
};
|
|
};
|
|
kavita =
|
|
let
|
|
cfg = config.my.servers.kavita;
|
|
in
|
|
lib.mkIf (cfg.enable || cfg.enableProxy) {
|
|
icon = "${cfg.name}.png";
|
|
href = cfg.url;
|
|
widget = {
|
|
type = cfg.name;
|
|
inherit (cfg) url;
|
|
username = "{{HOMEPAGE_VAR_KAVITA_USERNAME}}";
|
|
password = "{{HOMEPAGE_VAR_KAVITA_PASSWORD}}";
|
|
};
|
|
};
|
|
"qbittorrent server" =
|
|
let
|
|
url = "http://${config.my.ips.server}:${toString config.my.servers.qbittorrent.port}";
|
|
name = "qbittorrent";
|
|
in
|
|
lib.mkIf config.my.servers.qbittorrent.enable {
|
|
icon = "${name}.png";
|
|
href = url;
|
|
widget = {
|
|
type = name;
|
|
inherit url;
|
|
username = "{{HOMEPAGE_VAR_QBIT_USERNAME}}";
|
|
password = "{{HOMEPAGE_VAR_QBIT_PASSWORD}}";
|
|
};
|
|
};
|
|
"qbittorrent miniserver" =
|
|
let
|
|
url = "http://${config.my.ips.miniserver}:${toString config.my.servers.qbittorrent.port}";
|
|
name = "qbittorrent";
|
|
in
|
|
lib.mkIf config.my.servers.qbittorrent.enable {
|
|
icon = "${name}.png";
|
|
href = url;
|
|
widget = {
|
|
type = name;
|
|
inherit url;
|
|
username = "{{HOMEPAGE_VAR_QBIT_USERNAME}}";
|
|
password = "{{HOMEPAGE_VAR_QBIT_PASSWORD}}";
|
|
};
|
|
};
|
|
sabnzbd =
|
|
let
|
|
name = "sabnzbd";
|
|
url = "http://${config.my.ips.server}:${toString config.my.servers.sabnzbd.port}";
|
|
in
|
|
{
|
|
icon = "${name}.png";
|
|
href = url;
|
|
widget = {
|
|
type = name;
|
|
inherit url;
|
|
key = "{{HOMEPAGE_VAR_SABNZBD}}";
|
|
};
|
|
};
|
|
}
|