From 2d50571fa2ba00869d2f83d34a5378f4111ddbed Mon Sep 17 00:00:00 2001 From: alexion Date: Tue, 15 Sep 2026 20:01:59 -0400 Subject: [PATCH] fix(nixos): order homepage sections --- configs/nixos/modules/services/homepage.nix | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/configs/nixos/modules/services/homepage.nix b/configs/nixos/modules/services/homepage.nix index d205f1c..d0a9960 100644 --- a/configs/nixos/modules/services/homepage.nix +++ b/configs/nixos/modules/services/homepage.nix @@ -56,12 +56,37 @@ let orderedTabs = tabOrder ++ lib.filter (tab: !lib.elem tab tabOrder) (lib.attrNames entriesByTab); + sectionOrderByTab = { + Apps = [ + "Media" + "Files" + "Other" + ]; + Download = [ + "Library Managers" + "Other Utilities" + "Download Clients" + ]; + System = [ + "Monitoring" + "Network" + "Machines" + "Docker" + ]; + }; + + orderedSections = tab: sections: + let + sectionOrder = sectionOrderByTab.${tab} or [ ]; + in + sectionOrder ++ lib.filter (section: !lib.elem section sectionOrder) (lib.attrNames sections); + mkTab = tab: let sections = entriesByTab.${tab}; in { - ${tab} = map (section: { ${section} = sections.${section}; }) (lib.attrNames sections); + ${tab} = map (section: { ${section} = sections.${section}; }) (orderedSections tab sections); }; homepageServices = map mkTab (lib.filter (tab: lib.hasAttr tab entriesByTab) orderedTabs);