added homepage dashboard.

This commit is contained in:
Gabe Venberg 2024-10-19 18:20:50 +02:00
parent c21b1c5b5e
commit 4ee6301abe
3 changed files with 124 additions and 1 deletions

122
configs/nixos/homepage.nix Normal file
View file

@ -0,0 +1,122 @@
{
inputs,
config,
pkgs,
lib,
...
}: let
cfg = config.services.homepage-dashboard;
baseurl = "homepage.venberg.xyz";
in {
services.homepage-dashboard = {
enable = true;
settings = {
theme = "dark";
color = "slate";
headerStyle = "boxed";
base = "https://${baseurl}";
language = "en";
hideVersion=true;
statusStyle = "dot";
quicklaunch = {
searchDescriptions = true;
hideInternetSearch = false;
hideVisitUrl = false;
provider="duckduckgo";
};
};
widgets = [
{
datetime = {
text_size = "x2";
locale = "en-CA";
format = {
hourCycle = "h23";
hour12 = false;
year = "numeric";
month = "numeric";
day = "numeric";
hour = "numeric";
minute = "numeric";
};
};
}
{
resources = {
cpu = true;
disk = "/";
memory = true;
};
}
{
openmeteo = {
label = "Current";
units = "metric";
cache = 5;
};
}
{
openmeteo = {
label = "Mainz";
timezone = "Europe/Berlin";
units = "metric";
cache = 5;
latitude = 49.999444;
longitude = 8.273611;
};
}
];
services = [
{
Family = [
{
Jellyfin = {
icon = "sh-jellyfin.svg";
href = "https://media.venberg.xyz";
siteMonitor = "https://media.venberg.xyz";
description = "Movies";
};
}
{
Grocy = {
icon = "sh-grocy.svg";
href = "https://grocy.venberg.xyz";
siteMonitor = "https://grocy.venberg.xyz";
description = "Family ERP";
};
}
{
Radicale={
icon="sh-radicale.svg";
href="https://cal.venberg.xyz";
siteMonitor="https://cal.venberg.xyz";
description="Calander administration";
};
}
];
}
{
Development = [
{
Forgejo = {
icon = "sh-forgejo.svg";
href = "https://git.venberg.xyz";
siteMonitor = "https://git.venberg.xyz";
description = "Self hosted Git forge.";
};
}
];
}
];
};
services.nginx.virtualHosts.${baseurl} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://localhost:${toString cfg.listenPort}";
};
};
}

View file

@ -111,7 +111,7 @@
remoteBuild = true;
};
cirrus = {
hostname = "cal.venberg.xyz";
hostname = "cirrus";
profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.cirrus;
};
cirrostratus = {

View file

@ -20,6 +20,7 @@ inputs.nixpkgs.lib.nixosSystem {
../../configs/nixos/secrets.nix
../../configs/nixos/radicale.nix
../../configs/nixos/forgejo.nix
../../configs/nixos/homepage.nix
({
config,
pkgs,