add widget

This commit is contained in:
soraefir
2026-05-31 21:29:12 +02:00
parent 5d979d0720
commit 4322d315b2
3 changed files with 78 additions and 23 deletions

View File

@@ -4,28 +4,80 @@ let
serverCfg = config.syscfg.server;
settings = pkgs.writers.writeYAML "settings.yaml" {
title = "My Self-Hosted Dashboard";
base = "";
theme = "dark";
# layout = {
# Infrastructure = {
# style = "grid";
# columns = 3;
# };
# };
auth = {
oidc = {
enabled = true;
provider = "authentik";
issuerUrl = "https://${serverCfg.containers.authentik.subdomain}.${serverCfg.domain}";
clientId = "homepage";
clientSecret = "{{HOMEPAGE_VAR_OAUTH_SECRET}}";
groupsProperty = "groups";
title = "My Self-Hosted Dashboard";
description = "";
startUrl = "https://${containerCfg.subdomain}.${serverCfg.domain}";
background = {
# image = "...";
blur = "sm"; #sm, md, xl,...
# saturate = "";
# brightness = "";
# opacity = "";
};
cardBlur = "xs"; #xs, md, ...
# favicon = "";
theme = "dark";
color = "slate";
pwa = {
};
};
};
layout = {
Admin = {
style = "grid";
columns = 4;
};
};
providers = {
finnhub = "{{HOMEPAGE_VAR_FINNHUB}}";
};
headerStyle = "clean";
hideVersion = true;
disableUpdateCheck = true;
showStats = false;
statusStyle = "dot";
hideErrors = true;
auth = {
oidc = {
enabled = true;
provider = "authentik";
issuerUrl = "https://${serverCfg.containers.authentik.subdomain}.${serverCfg.domain}";
clientId = "homepage";
clientSecret = "{{HOMEPAGE_VAR_OAUTH_SECRET}}";
groupsProperty = "groups";
};
};
};
widgets = pkgs.writers.writeYAML "widgets.yaml" [
{openmeteo = {
latitude = "47.3769";
longitude = "8.5417";
timezone = "Europe/Zurich";
units = "metric";
cache = "15";
};}
{search = {
provider = "custom";
focus = true;
showSearchSuggestions = true;
target = "_blank";
url = "https://${serverCfg.containers.searxng.subdomain}.${serverCfg.domain}/search?q=";
suggestionUrl = "https://${serverCfg.containers.searxng.subdomain}.${serverCfg.domain}/autocompleter?q=";
};}
{stocks = {
provider = "finnhub";
color = true;
cache = 15;
watchlist = containerCfg.extra.stocks or [];
};}
];
bookmarks = pkgs.writers.writeYAML "bookmarks.yaml" [
];
services = pkgs.writers.writeYAML "services.yaml" [
{Media = lib.flatten [
(lib.optional (serverCfg.containers?jellyfin) {
@@ -212,7 +264,7 @@ let
};
})
# Bazarr
))
];}#)];}
];
@@ -237,6 +289,8 @@ in {
volumes = [
"${settings}:/app/config/settings.yaml:ro"
"${services}:/app/config/services.yaml:ro"
"${widgets}:/app/config/widgets.yaml:ro"
"${bookmarks}:/app/config/bookmarks.yaml:ro"
];
};
};