masive rewriting and setup of server files

This commit is contained in:
2024-09-28 23:10:03 -06:00
parent f9399c51fa
commit 9151ca5971
39 changed files with 756 additions and 556 deletions

View File

@@ -1,25 +1,28 @@
{ config, lib, ... }:
{
audiobookshelf = lib.mkIf config.my.servers.audiobookshelf.enable {
icon = "${config.my.servers.audiobookshelf.name}.png";
href = config.my.servers.audiobookshelf.url;
widget = {
type = config.my.servers.audiobookshelf.name;
url = config.my.servers.audiobookshelf.url;
key = "{{HOMEPAGE_VAR_AUDIOBOOKSHELF}}";
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
name = "jellyfin";
url = "https://flix.servidos.lat";
cfg = config.my.servers.jellyfin;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
inherit (cfg) url;
type = cfg.name;
key = "{{HOMEPAGE_VAR_JELLYFIN}}";
enableUser = true;
enableBlocks = true;
@@ -28,15 +31,14 @@
};
"now playing" =
let
name = "jellyfin";
url = "https://flix.servidos.lat";
cfg = config.my.servers.jellyfin;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
inherit (cfg) url;
type = cfg.name;
key = "{{HOMEPAGE_VAR_JELLYFIN}}";
enableUser = true;
enableBlocks = false;
@@ -47,117 +49,111 @@
};
sonarr =
let
name = "sonarr";
url = "https://series.servidos.lat";
cfg = config.my.servers.sonarr;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
inherit (cfg) url;
type = cfg.name;
key = "{{HOMEPAGE_VAR_SONARR}}";
enableQueue = true;
};
};
radarr =
let
name = "radarr";
url = "https://movies.servidos.lat";
cfg = config.my.servers.radarr;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
inherit (cfg) url;
type = cfg.name;
key = "{{HOMEPAGE_VAR_RADARR}}";
enableQueue = true;
};
};
lidarr =
let
name = "lidarr";
url = "https://music.servidos.lat";
cfg = config.my.servers.lidarr;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
inherit (cfg) url;
type = cfg.name;
key = "{{HOMEPAGE_VAR_LIDARR}}";
};
};
prowlarr =
let
name = "prowlarr";
url = "https://indexer.servidos.lat";
cfg = config.my.servers.prowlarr;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
type = cfg.name;
inherit (cfg) url;
key = "{{HOMEPAGE_VAR_PROWLARR}}";
};
};
bazarr =
let
name = "bazarr";
url = "https://subs.servidos.lat";
cfg = config.my.servers.bazarr;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
type = cfg.name;
inherit (cfg) url;
key = "{{HOMEPAGE_VAR_BAZARR}}";
};
};
kavita =
let
name = "kavita";
url = "https://library.servidos.lat";
cfg = config.my.servers.kavita;
in
{
icon = "${name}.png";
href = url;
lib.mkIf (cfg.enable || cfg.enableProxy) {
icon = "${cfg.name}.png";
href = cfg.url;
widget = {
type = name;
url = url;
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";
url = "http://192.168.1.69:9091";
in
{
lib.mkIf config.my.servers.qbittorrent.enable {
icon = "${name}.png";
href = url;
widget = {
type = name;
url = url;
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";
url = "http://192.168.1.100:9091";
in
{
lib.mkIf config.my.servers.qbittorrent.enable {
icon = "${name}.png";
href = url;
widget = {
type = name;
url = url;
inherit url;
username = "{{HOMEPAGE_VAR_QBIT_USERNAME}}";
password = "{{HOMEPAGE_VAR_QBIT_PASSWORD}}";
};
@@ -165,14 +161,14 @@
sabnzbd =
let
name = "sabnzbd";
url = "http://192.168.1.69:3399";
url = "http://${config.my.ips.server}:${toString config.my.servers.sabnzbd.port}";
in
{
icon = "${name}.png";
href = url;
widget = {
type = name;
url = url;
inherit url;
key = "{{HOMEPAGE_VAR_SABNZBD}}";
};
};