old
  1{lib, ...}: let
  2  mapHomepageConf = attrs: lib.mapAttrsToList (n: v: {${n} = v;}) attrs;
  3in {
  4  services.homepage-dashboard = {
  5    enable = true;
  6    listenPort = 4982;
  7    openFirewall = false;
  8    allowedHosts = "home.hpcesia.com";
  9    settings = {
 10      # Basic Infomations
 11      title = "";
 12      subtitle = "HPCesia";
 13      description = "HPCesia ";
 14      favicon = "https://blog.hpcesia.com/favicon.svg";
 15      language = "zh-CN";
 16      startUrl = "https://home.hpcesia.com";
 17      base = "https://home.hpcesia.com";
 18
 19      # Appearance
 20      background = {
 21        image = "https://bu.dusays.com/2024/11/18/673ac3b7d597c.webp";
 22        brightness = 75;
 23        opacity = 75;
 24      };
 25      theme = "dark";
 26      color = "lime";
 27      headerStyle = "clean";
 28      iconStyle = "flat";
 29      useEqualHeights = true;
 30    };
 31    widgets = mapHomepageConf {
 32      resources = {
 33        cpu = true;
 34        memory = true;
 35        disk = "/";
 36        uptime = true;
 37      };
 38      datetime = {
 39        text_size = "2xl";
 40        locale = "zh-CN";
 41        format = {
 42          dateStyle = "short";
 43          timeStyle = "short";
 44        };
 45      };
 46    };
 47  };
 48
 49  services.homepage-dashboard.settings.layout = mapHomepageConf {
 50    "" = {
 51      style = "row";
 52      columns = 3;
 53      tab = "";
 54    };
 55    NestedGroup-1 = {
 56      header = false;
 57      style = "row";
 58      columns = 2;
 59      "" = {
 60        style = "column";
 61        tab = "";
 62      };
 63      "" = {
 64        style = "column";
 65        tab = "";
 66      };
 67    };
 68  };
 69
 70  services.homepage-dashboard.services = mapHomepageConf {
 71    "" = mapHomepageConf {
 72      GitHub = {
 73        href = "https://github.com/";
 74        icon = "github.svg";
 75      };
 76      Codeberg = {
 77        href = "https://codeberg.org/";
 78        icon = "codeberg.svg";
 79      };
 80      Forgejo = {
 81        href = "https://repo.hpcesia.com/";
 82        icon = "forgejo.svg";
 83        siteMonitor = "https://repo.hpcesia.com/";
 84      };
 85      Cloudflare = {
 86        href = "https://dash.cloudflare.com/";
 87        icon = "cloudflare.svg";
 88      };
 89      Netlify = {
 90        href = "https://app.netlify.com/";
 91        icon = "netlify.svg";
 92      };
 93      Grafana = {
 94        href = "https://grafana.hpcesia.com/";
 95        icon = "grafana.svg";
 96        siteMonitor = "https://grafana.hpcesia.com/";
 97      };
 98    };
 99    "" = mapHomepageConf {
100      Gokapi = {
101        href = "https://send.hpcesia.com/admin";
102        icon = "sh-gokapi.png";
103        siteMonitor = "https://send.hpcesia.com/";
104      };
105      Hoppscotch = {
106        href = "https://hoppscotch.io/";
107        icon = "hoppscotch.svg";
108      };
109      Squoosh = {
110        href = "https://squoosh.app/";
111        icon = "sh-squoosh.svg";
112      };
113      GoatCounter = {
114        href = "https://goatcounter.hpcesia.com/";
115        icon = "sh-goatcounter.svg";
116        siteMonitor = "https://goatcounter.hpcesia.com/";
117      };
118    };
119    "" = mapHomepageConf {
120      FreshRSS = {
121        href = "https://rss.hpcesia.com/";
122        icon = "freshrss.svg";
123        siteMonitor = "https://rss.hpcesia.com/";
124      };
125      Trinnon = {
126        href = "https://trin.one/";
127        icon = "https://trin.one/fileserver/01H6611F79D6TD4PCS5YVHWFJZ/attachment/original/01JVQEQBVWB6EXGQ5WGR823C5Y.png";
128        siteMonitor = "https://trin.one/livez";
129      };
130      Blog = {
131        href = "https://blog.hpcesia.com/";
132        icon = "https://blog.hpcesia.com/favicon.svg";
133        siteMonitor = "https://blog.hpcesia.com/";
134      };
135    };
136  };
137}