aboutsummaryrefslogtreecommitdiff
path: root/modules/dashboard/dashboard-template.nix
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-06-13 22:01:46 +0530
committerAkshay Nair <phenax5@gmail.com>2025-06-13 22:01:46 +0530
commitbbf5ca376326363aeef437c885d98c5c3c54176e (patch)
treee3bf0c48f3e25ea717699180aa17eed04ddff9a7 /modules/dashboard/dashboard-template.nix
parentf5949df9e5e39140fcc66589eada13738d2cf730 (diff)
downloadhomeserver-nixos-config-bbf5ca376326363aeef437c885d98c5c3c54176e.tar.gz
homeserver-nixos-config-bbf5ca376326363aeef437c885d98c5c3c54176e.zip
Move dashboard link to settings
Diffstat (limited to 'modules/dashboard/dashboard-template.nix')
-rw-r--r--modules/dashboard/dashboard-template.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/dashboard/dashboard-template.nix b/modules/dashboard/dashboard-template.nix
index 43812a0..4c4b67f 100644
--- a/modules/dashboard/dashboard-template.nix
+++ b/modules/dashboard/dashboard-template.nix
@@ -1,4 +1,4 @@
-{ title, links, ... }:
+{ title, links ? [], embedLink ? null, ... }:
with builtins;
let
withLinkAttr = link: attr: def: value:
@@ -108,9 +108,7 @@ let
'';
headerHTML = ''
- <header>
- ${title}
- </header>
+ <header>${title}</header>
'';
in
''
@@ -127,9 +125,11 @@ in
<section class="links-container">
${concatStringsSep "" (map linkHTML links)}
</section>
- <section class="stats-container">
- <iframe src="http://grafana.local/public-dashboards/4d3d386f6eb9475bb202fe793c0a72c3"></iframe>
- </section>
+ ${if embedLink == null then "" else ''
+ <section class="stats-container">
+ <iframe src="${embedLink}"></iframe>
+ </section>
+ ''}
<script>${script}</script>
</body>
</html>