aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2025-12-07 14:03:23 +0100
committerMartin Fischer <martin@push-f.com>2025-12-07 14:03:23 +0100
commit8093a29e545595fd53364510dc408176c0777482 (patch)
treedf6959a426432c69e63f40de419d310e823a7eb7 /nixos
parent705a16aa3c345f9b4e1c0fdd032f498e906a8f01 (diff)
tweak: mobile-optimize and style serviceIndexHost
Diffstat (limited to 'nixos')
-rw-r--r--nixos/helpers.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/helpers.nix b/nixos/helpers.nix
index a30ccd8..e64ef0a 100644
--- a/nixos/helpers.nix
+++ b/nixos/helpers.nix
@@ -63,7 +63,16 @@
serviceIndexHost = tailnetHostname: webPorts:
let
li = name: port: ''<li><a href="http://${tailnetHostname}:${toString port}">${name}</a></li>'';
- html = "<ul>" + (lib.concatStringsSep "\n" (lib.mapAttrsToList li webPorts)) + "</ul>";
+ style = ''<!doctype html><meta name="viewport" content="width=device-width">
+ <style>
+ :root { color-scheme: light dark; }
+
+ body {
+ background-color: light-dark(#fff, #141414);
+ color: light-dark(#000, #fff);
+ }
+ </style>'';
+ html = style + "<ul>" + (lib.concatStringsSep "\n" (lib.mapAttrsToList li webPorts)) + "</ul>";
in
{
locations."= /".extraConfig = ''