nix-config/hosts/nixedo/services/homepage/services.nix

33 lines
832 B
Nix
Raw Normal View History

{ config, lib }:
2025-04-28 00:36:43 +01:00
with lib;
let
homelab = config.features.homelab.services;
2025-04-28 01:58:11 +01:00
homepageCategories = [
"Media"
"Services"
];
2025-04-28 00:26:30 +01:00
homepageServices =
category:
(attrsets.filterAttrs (
name: value: value ? homepage && value.homepage.category == category
) homelab);
services = lists.forEach homepageCategories (cat: {
"${cat}" =
lib.lists.forEach (lib.attrsets.mapAttrsToList (name: value: name) (homepageServices "${cat}"))
(x: {
"${homelab.${x}.homepage.name}" = {
icon = homelab.${x}.homepage.icon;
description = homelab.${x}.homepage.description;
href = "https://${homelab.${x}.url}";
siteMonitor = "https://${homelab.${x}.url}";
2025-04-28 00:36:43 +01:00
};
});
});
in
2025-04-30 13:42:51 +01:00
services ++ [ (import ./glances.nix { inherit config; }) ]