homepage: wip cal, weather + secret hidden

This commit is contained in:
Danilo Reyes 2025-01-22 21:31:32 -06:00
parent a83fbf5e9a
commit a1b9f9e47d
5 changed files with 87 additions and 14 deletions

View File

@ -13,13 +13,18 @@ in
enable = true;
listenPort = cfg.port;
environmentFile = config.sops.secrets.homepage.path;
settings.layout = import ./homepage/layout.nix;
settings = {
providers.openweathermap = "ca54bc3999f608a5ad6e48b9c6c002ec";
layout = import ./homepage/layout.nix;
};
widgets = import ./homepage/widgets.nix;
services = import ./homepage/services.nix { inherit lib config; };
bookmarks =
builtins.readDir ./homepage/bookmarks
|> builtins.attrNames
|> builtins.filter (file: builtins.match ".*\\.nix" file != null)
|> builtins.filter (
file: builtins.match ".*\\.nix" file != null && !(builtins.match "^secret-.*" file != null)
)
|> map (file: import ./homepage/bookmarks/${file});
};
nginx.virtualHosts."${cfg.host}" = lib.mkIf cfg.enableProxy (setup.proxyReverse cfg);

View File

@ -1,9 +1,15 @@
{
stash = {
header = false;
tab = "secret";
style = "row";
};
# stash = {
# header = false;
# tab = "secret";
# style = "row";
# };
# productivity = {
# header = false;
# tab = "productivity";
# style = "row";
# columns = 1;
# };
multimedia = {
header = false;
tab = "servers";
@ -34,7 +40,7 @@
shopping.tab = "bookmarks";
social.tab = "bookmarks";
development.tab = "bookmarks";
"secret art".tab = "secret";
"secret media".tab = "secret";
"secret social".tab = "secret";
# "secret art".tab = "secret";
# "secret media".tab = "secret";
# "secret social".tab = "secret";
}

View File

@ -1,5 +1,49 @@
{ lib, config, ... }:
{
calendar.widget = {
type = "calendar";
firstDayInWeek = "sunday";
view = "monthly";
maxEvents = 10;
showTime = true;
timezone = "America/Mexico_City";
integrations =
let
createIntegration = name: color: {
type = name;
service_group = "multimedia";
service_name = name;
color = color;
params.unmonitored = true;
};
in
[
(createIntegration "sonarr" "teal")
(createIntegration "radarr" "amber")
(createIntegration "lidarr" "lime")
{
type = "ical";
url = "https://cloud.servidos.lat/remote.php/dav/public-calendars/QLfA37F4dA2q4Way?export";
name = "chores";
color = "yellow";
params.showName = true;
}
{
type = "ical";
url = "https://cloud.servidos.lat/remote.php/dav/public-calendars/8jbXjTKrYqoqHk7M?export";
name = "personal";
color = "blue";
params.showName = true;
}
{
type = "ical";
url = "https://cloud.servidos.lat/remote.php/dav/public-calendars/3zdXGggc6P4JF4WB?export";
name = "health";
color = "yellow";
params.showName = true;
}
];
};
audiobookshelf =
let
cfg = config.my.servers.audiobookshelf;

View File

@ -3,9 +3,14 @@ let
services = import ./service-widgets.nix { inherit lib config; };
in
[
{ "stash" = [ { inherit (services) stash; } ]; }
# { "stash" = [ { inherit (services) stash; } ]; }
# {
# productivity = [
# { inherit (services) calendar; }
# ];
# }
{
"multimedia" = [
multimedia = [
{ inherit (services) plex; }
{ inherit (services) jellyfin; }
{ inherit (services) audiobookshelf; }
@ -13,7 +18,7 @@ in
];
}
{
"piracy" = [
piracy = [
{ inherit (services) sonarr; }
{ inherit (services) radarr; }
{ inherit (services) lidarr; }
@ -25,7 +30,7 @@ in
];
}
{
"main" = [
main = [
{ inherit (services) nextcloud; }
{ inherit (services) mealie; }
{ inherit (services) paperless; }

View File

@ -19,4 +19,17 @@
showSearchSuggestions = true;
};
}
{
openweathermap = {
label = "Celaya";
latitude = 20.5167;
longitude = -100.8167;
units = "metric";
provider = "openweathermap";
cache = 5;
format = {
maximumFractionDigits = 1;
};
};
}
]