diff --git a/flake.nix b/flake.nix index 9efd97c..f1c8205 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 297 current 2025-10-11 13:48:37 25.05.20251006.20c4598 6.12.50 * +# generation: 298 current 2025-10-11 14:26:58 25.05.20251006.20c4598 6.12.50 * { description = "blakes nix config"; inputs = { diff --git a/modules/homelab/services/glance/default.nix b/modules/homelab/services/glance/default.nix index 95a3d97..ed2d94e 100644 --- a/modules/homelab/services/glance/default.nix +++ b/modules/homelab/services/glance/default.nix @@ -5,14 +5,6 @@ let cfg = config.modules.services.${service}; sec = config.sops.secrets; homelab = config.modules.homelab; - services = lib.attrsets.mapAttrsToList (name: srv: - { - title = srv.name; - icon = srv.icon; - url = srv.url; - allow-insecure = srv.icon; - } - ) config.modules.services.${service}.link; in { options.modules.services.${service} = { @@ -75,14 +67,27 @@ in }; services.${service} = { - enable = true; - openFirewall = true; - settings = { - server = { - host = "0.0.0.0"; - port = cfg.port; - }; - pages = [ + enable = true; + openFirewall = true; + settings = { + server = { + host = "0.0.0.0"; + port = cfg.port; + }; + pages = let + # Pre-filter links per category + categorySites = lib.listToAttrs (map (cat: { + name = mediastack; + value = lib.attrsets.mapAttrsToList (name: srv: + { + title = srv.description; + url = srv.url; + icon = srv.icon; + } + ) (lib.attrsets.filterAttrs (k: v: v.category == cat) config.services.glance.link); + }) categories); + in + [ { name = "violet"; hide-desktop-navigation = true;