From aa7ef695f4657035d92c0dc2ddd028526178d2c5 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Thu, 9 Jul 2026 20:33:22 +0200 Subject: [PATCH] manatee: Add ability to specify public url for `homepage` card --- hosts/manatee/modules/homepage/default.nix | 24 +++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/hosts/manatee/modules/homepage/default.nix b/hosts/manatee/modules/homepage/default.nix index 07683fb..e5e962f 100644 --- a/hosts/manatee/modules/homepage/default.nix +++ b/hosts/manatee/modules/homepage/default.nix @@ -9,13 +9,18 @@ let nginxEnabled = config.mod.nginx.enable; services = config.mod.homepage.services; - serviceToCard = svc: '' - -
${svc.name}
-
${svc.description}
-
:${toString svc.port}
-
- ''; + serviceToCard = + svc: + let + href = if svc.url != null then svc.url else "http://manatee:${toString svc.port}"; + in + '' + +
${svc.name}
+
${svc.description}
+
:${toString svc.port}
+
+ ''; page = pkgs.writeTextDir "index.html" '' @@ -83,6 +88,11 @@ in name = lib.mkOption { type = lib.types.str; }; port = lib.mkOption { type = lib.types.port; }; description = lib.mkOption { type = lib.types.str; }; + url = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = "Link target for the card; defaults to http://manatee:."; + }; }; } );