glance: init
This commit is contained in:
parent
c410a78eb2
commit
96c4304e08
4 changed files with 184 additions and 2 deletions
176
modules/nixos/services/homeserver/glance.nix
Normal file
176
modules/nixos/services/homeserver/glance.nix
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
sops.secrets."glance/secrets.env" = {};
|
||||
|
||||
services.caddy.virtualHosts."glance.taild5f7e6.ts.net".extraConfig = ''
|
||||
import default-settings
|
||||
|
||||
bind tailscale/glance
|
||||
|
||||
reverse_proxy localhost:${toString config.services.glance.settings.server.port}
|
||||
'';
|
||||
|
||||
services.glance = {
|
||||
enable = true;
|
||||
environmentFile = config.sops.secrets."glance/secrets.env".path;
|
||||
settings = {
|
||||
server = {
|
||||
host = "127.0.0.1";
|
||||
port = 8008;
|
||||
proxied = true;
|
||||
};
|
||||
|
||||
pages =
|
||||
let
|
||||
domain = "wo2wz.fyi";
|
||||
tsDomain = "taild5f7e6.ts.net";
|
||||
in [
|
||||
{
|
||||
name = "Home";
|
||||
columns = [
|
||||
{
|
||||
size = "small";
|
||||
widgets = [
|
||||
{
|
||||
# xkcd
|
||||
type = "custom-api";
|
||||
cache = "1h";
|
||||
title = "XKCD";
|
||||
title-url = "https://xkcd.com";
|
||||
|
||||
url = "https://xkcd.com/info.0.json";
|
||||
template = ''
|
||||
<body>{{ .JSON.String "title" }}</body>
|
||||
<img src="{{ .JSON.String "img" }}"></img>
|
||||
'';
|
||||
}
|
||||
{
|
||||
type = "hacker-news";
|
||||
cache = "30m";
|
||||
limit = 10;
|
||||
collapse-after = 5;
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
size = "full";
|
||||
widgets = [
|
||||
{
|
||||
type = "search";
|
||||
title-url = "https://searxng.${tsDomain}";
|
||||
search-engine = "https://searxng.${tsDomain}/search?q={QUERY}";
|
||||
autofocus = true;
|
||||
}
|
||||
{
|
||||
type = "bookmarks";
|
||||
same-tab = true;
|
||||
groups = [
|
||||
{
|
||||
title = "Services";
|
||||
links = [
|
||||
{
|
||||
title = "Proton Mail";
|
||||
icon = "sh:proton-mail";
|
||||
url = "https://mail.proton.me";
|
||||
}
|
||||
{
|
||||
title = "Cloudflare Dashboard";
|
||||
icon = "sh:cloudflare";
|
||||
url = "https://dash.cloudflare.com";
|
||||
}
|
||||
{
|
||||
title = "Tailscale Dashboard";
|
||||
icon = "sh:tailscale";
|
||||
url = "https://login.tailscale.com/admin";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Self Hosted (Public)";
|
||||
links = [
|
||||
{
|
||||
title = "Nextcloud";
|
||||
icon = "sh:nextcloud";
|
||||
url = "https://nextcloud.${domain}/index.php";
|
||||
}
|
||||
{
|
||||
title = "Forgejo";
|
||||
icon = "sh:forgejo";
|
||||
url = "https://git.${domain}";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Self Hosted (Private)";
|
||||
links = [
|
||||
{
|
||||
title = "Vaultwarden";
|
||||
icon = "sh:vaultwarden";
|
||||
url = "https://vaultwarden.${tsDomain}";
|
||||
}
|
||||
{
|
||||
title = "Jellyfin";
|
||||
icon = "sh:jellyfin";
|
||||
url = "https://jellyfin.${tsDomain}";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
title = "Self Hosted (Monitoring)";
|
||||
links = [
|
||||
{
|
||||
title = "Grafana";
|
||||
icon = "sh:grafana";
|
||||
url = "https://grafana.${tsDomain}";
|
||||
}
|
||||
{
|
||||
title = "Uptime Kuma";
|
||||
icon = "sh:uptime-kuma";
|
||||
url = "https://uptime-kuma.${domain}";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
size = "small";
|
||||
widgets = [
|
||||
{
|
||||
type = "clock";
|
||||
title = "Time and Weather";
|
||||
hour-format = "24h";
|
||||
timezones = [
|
||||
{
|
||||
timezone = "America/New_York";
|
||||
label = "New York";
|
||||
}
|
||||
{
|
||||
timezone = "Etc/UTC";
|
||||
label = "UTC";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
type = "calendar";
|
||||
hide-header = true;
|
||||
first-day-of-week = "sunday";
|
||||
}
|
||||
{
|
||||
type = "weather";
|
||||
hide-header = true;
|
||||
location = "\${GLANCE_WEATHER_LOCATION}";
|
||||
units = "imperial";
|
||||
hour-format = "24h";
|
||||
hide-location = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue