Files
flocon/machines/genepi/glance-config.nix

281 lines
7.9 KiB
Nix

{
theme = {
light = true;
background-color = "0 0 95";
primary-color = "0 0 10";
negative-color = "0 90 50";
};
pages = [
{
name = "Home";
columns = [
{
size = "small";
widgets = [
{
type = "calendar";
first-day-of-week = "monday";
}
{
type = "server-stats";
servers = [
{
type = "local";
name = "Genepi";
}
];
}
];
}
{
size = "full";
widgets = [
{
type = "search";
autofocus = true;
}
{
type = "monitor";
cache = "1m";
title = "Services";
sites = [
{
title = "Immich";
url = "https://images.home.rpqt.fr";
icon = "sh:immich";
}
{
title = "FreshRSS";
url = "https://rss.home.rpqt.fr";
icon = "sh:freshrss";
}
{
title = "Syncthing";
url = "https://genepi.home.rpqt.fr/syncthing";
icon = "sh:syncthing";
}
{
title = "Actual Budget";
url = "https://actual.home.rpqt.fr";
icon = "sh:actual-budget";
}
{
title = "Gitea";
url = "https://git.turifer.dev";
icon = "sh:gitea";
}
{
title = "Pinchflat";
url = "https://pinchflat.home.rpqt.fr";
icon = "https://cdn.jsdelivr.net/gh/selfhst/icons/png/pinchflat.png";
}
{
title = "Home Assistant";
url = "https://assistant.home.rpqt.fr";
icon = "sh:home-assistant";
}
{
title = "Nextcloud";
url = "https://cloud.rpqt.fr";
icon = "sh:nextcloud";
}
{
title = "Buildbot";
url = "https://buildbot.turifer.dev";
icon = "https://buildbot.turifer.dev/icon.svg";
}
{
title = "Radicle";
url = "https://app.radicle.xyz/nodes/radicle.rpqt.fr";
icon = "sh:radicle";
}
];
}
{
type = "monitor";
cache = "1m";
title = "Monitoring";
sites = [
{
title = "Grafana";
url = "https://grafana.home.rpqt.fr";
icon = "sh:grafana";
}
{
title = "Prometheus";
url = "http://genepi.home.rpqt.fr:9090";
icon = "sh:prometheus";
}
];
}
{
type = "monitor";
cache = "1m";
title = "Sites";
sites = [
{
title = "Lounge";
url = "https://lounge.home.rpqt.fr";
icon = "si:html5";
}
{
title = "Web corner";
url = "https://rpqt.fr";
icon = "si:html5";
}
];
}
{
type = "bookmarks";
groups = [
{
title = "Music";
links = [
{
title = "YouTube Music";
url = "https://music.youtube.com";
}
{
title = "Music for programming";
url = "https://musicforprogramming.net/latest/";
}
];
}
];
}
];
}
{
size = "small";
widgets =
let
locations = [
"Krakow, Poland"
"Grenoble, France"
"Saint-Michel-de-Maurienne, France"
];
in
builtins.map (location: {
type = "weather";
inherit location;
units = "metric";
hour-format = "24h";
}) locations;
}
];
}
{
name = "Feeds";
columns = [
{
size = "small";
widgets = [
{
type = "rss";
title = "Blogs";
limit = 10;
collapse-after = 5;
cache = "12h";
feeds = [
{
url = "https://rss.home.rpqt.fr/api/query.php?user=rpqt&t=74HfeLZ6Wu9h4MmjNR38Rz&f=rss";
}
];
}
{
type = "rss";
title = "Status & Updates";
limit = 3;
cache = "12h";
feeds = [
{
url = "https://status.sr.ht/index.xml";
}
];
}
];
}
{
size = "full";
widgets = [
{
type = "group";
widgets = [
{
type = "hacker-news";
}
{
type = "lobsters";
}
];
}
{
type = "group";
widgets = [
{
type = "reddit";
subreddit = "selfhosted";
show-thumbnails = true;
}
{
type = "reddit";
subreddit = "homelab";
show-thumbnails = true;
}
];
}
{
type = "videos";
channels = [
"UCR-DXc1voovS8nhAvccRZhg"
"UCsBjURrPoezykLs9EqgamOA"
];
}
];
}
{
size = "small";
widgets = [
{
type = "releases";
cache = "1d";
repositories = [
"glanceapp/glance"
];
}
{
type = "custom-api";
title = "Random Fact";
cache = "6h";
url = "https://uselessfacts.jsph.pl/api/v2/facts/random";
template = ''
<p class="size-h4 color-paragraph">{{ .JSON.String "text" }}</p>
'';
}
{
type = "custom-api";
title = "Steam Specials";
cache = "12h";
url = "https://store.steampowered.com/api/featuredcategories?cc=us";
template = ''
<ul class="list list-gap-10 collapsible-container" data-collapse-after="5">
{{ range .JSON.Array "specials.items" }}
<li>
<a class="size-h4 color-highlight block text-truncate" href="https://store.steampowered.com/app/{{ .Int "id" }}/">{{ .String "name" }}</a>
<ul class="list-horizontal-text">
<li>{{ div (.Int "final_price" | toFloat) 100 | printf "$%.2f" }}</li>
{{ $discount := .Int "discount_percent" }}
<li{{ if ge $discount 40 }} class="color-positive"{{ end }}>{{ $discount }}% off</li>
</ul>
</li>
{{ end }}
</ul>
'';
}
];
}
];
}
];
}