Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/runbooks/build-the-sensitive-tier-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ what each key is for. The values:
| `GLANCE_IMMICH_API_KEY`, `GLANCE_PAPERLESS_TOKEN` | Minted in Immich and Paperless-ngx once they are up, each read-only, for the Household page's two numbers — the clicks are beside the keys in the example file | No |
| `GLANCE_PROMETHEUS_TOKEN` | The estate's reader token, `INGEST_TOKEN_READER` in `secrets/observability.sops.yaml` | No. `secrets/observability.sops.yaml` holds the original |
| `GLANCE_MINIFLUX_FEVER_KEY` | The MD5 of `glance:<fever password>`, once Miniflux is up and its user `glance` exists — the steps are beside the key in the example file ([ADR-0098](../adr/0098-add-glance-as-the-operators-start-page-beside-homepage.md)) | The Fever password and the `glance` login, both generated |
| `GLANCE_TSP_SHEET_ID`, `GLANCE_GOOGLE_API_KEY` | The link-shared sheet of TSP prices and a Google API key restricted to the Sheets API, for the TSP widget on Sports & Markets — the steps are beside them in the example file | The key is in the operator's Google Cloud project; the sheet in their Drive |
| `GLANCE_MARKETS`, `GLANCE_BOOKMARKS`, `GLANCE_VIDEO_TABS`, `GLANCE_REDDIT_TABS` | The operator's own lists, one line of JSON each, in the shape `secrets/sensitive.example.yaml` gives ([ADR-0100](../adr/0100-grow-glance-into-a-homelab-page-and-keep-the-operators-lists-in-sops.md)). Not credentials | No |
| `NTFY_ALERTMANAGER_TOKEN` | the pinned image's `ntfy token generate` — the command is beside the key | No. The monitoring host's `ALERTMANAGER_NTFY_TOKEN` is the other copy |
| `NTFY_ALERTMANAGER_PASSWORD_HASH` | `make gen-secret`, then `make hash-password` on it | No — the password is thrown away; this user logs in by token |
Expand Down
2 changes: 2 additions & 0 deletions scripts/render-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ COMPOSE_VARS=(
GLANCE_IMMICH_API_KEY
GLANCE_PAPERLESS_TOKEN
GLANCE_MINIFLUX_FEVER_KEY
GLANCE_GOOGLE_API_KEY
GLANCE_TSP_SHEET_ID
GLANCE_MARKETS
GLANCE_BOOKMARKS
GLANCE_VIDEO_TABS
Expand Down
2 changes: 2 additions & 0 deletions scripts/seed-validation-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ STACK="${REPO_ROOT}/stacks/${2:-observability}"
echo "GLANCE_IMMICH_API_KEY=validation-only"
echo "GLANCE_PAPERLESS_TOKEN=validation-only"
echo "GLANCE_MINIFLUX_FEVER_KEY=validation-only"
echo "GLANCE_GOOGLE_API_KEY=validation-only"
echo "GLANCE_TSP_SHEET_ID=validation-only"
# Glance's own lists are substituted into YAML, so a placeholder string
# would not parse: each is the smallest valid list of its kind (ADR-0100),
# single-quoted as render-config.sh writes them. The bookmark title holds a
Expand Down
20 changes: 20 additions & 0 deletions secrets/sensitive.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,26 @@ MINIFLUX_ADMIN_PASSWORD: change-me-to-something-long-and-random
# Rotation is a new Fever password in step 2, then step 3 again.
GLANCE_MINIFLUX_FEVER_KEY: change-me-to-the-md5-of-glance-colon-fever-password

# The TSP L 2060 widget on Sports & Markets. Yahoo has no TSP fund, so Glance
# reads the prices from a Google Sheet through the Sheets API.
#
# GLANCE_TSP_SHEET_ID A sheet of PUBLIC prices only, never the operator's
# portfolio. Make a new sheet and put in A1:
# =QUERY(IMPORTRANGE("<portfolio sheet URL>",
# "'TSP Talk'!B5:K400"), "select Col1, Col10
# where Col10 is not null", 0)
# (Col1 the date, Col10 the L 2060 price), allow the
# import once, then Share › General access ›
# Anyone with the link, Viewer. The id is the part
# of its URL between /d/ and /edit.
# GLANCE_GOOGLE_API_KEY Google Cloud console › APIs & Services: enable the
# Google Sheets API, then Credentials › Create
# credentials › API key, and under API restrictions
# allow the Sheets API alone. It can then read only
# sheets that are already shared by link.
GLANCE_TSP_SHEET_ID: change-me-to-the-link-shared-price-sheets-id
GLANCE_GOOGLE_API_KEY: change-me-to-a-key-restricted-to-the-sheets-api

# Glance's own lists (ADR-0100). NOT credentials. They are here because this
# repository is public and they describe a person: what they watch, read,
# invest in and log in to. Each is ONE LINE of JSON, which Glance substitutes
Expand Down
8 changes: 5 additions & 3 deletions secrets/sensitive.sops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@ HA_PROMETHEUS_AUTHORIZATION: ENC[AES256_GCM,data:ihcNRT2Mo69phul4LOyORBRe1hf0AEY
HA_MEDIATV_MAC: ENC[AES256_GCM,data:0sETYf4QvjwzI9A9AWutf7A=,iv:HKz+UwMIrdxwv15Bw+DiZxz325PNZnCn4sMc6YYKbLg=,tag:y8LVYSILvSbk4ecNjC//Og==,type:str]
GLANCE_PROMETHEUS_TOKEN: ENC[AES256_GCM,data:SVWcpKq+bT+n1kPsmDS04drjoMabcEYoLdycVaNRgeiMrQvBAJ7urb3TY0kDAwyu,iv:/plbw59D8ydETVBL/fZ0vsEndD4SOlOqc1Hn/fcqzj4=,tag:U4rtSG/g5HtUf+lCWiduHQ==,type:str]
GLANCE_MINIFLUX_FEVER_KEY: ENC[AES256_GCM,data:pXtN/Jvs9/eLQ1ZCtuECDO+d54xMk4zO6N/YT+qTaBE=,iv:ujCwDGUBfjGdnkN6fk3Qv9GmYvrLjsjl9n7RNHQtuDs=,tag:6sfUDJzxuDGWuhtIncGfGQ==,type:str]
GLANCE_MARKETS: ENC[AES256_GCM,data:jrYowwejJZXk0JrzAJsfX6PCN0in6gZEeYFEp4ANBnDSb4Es1R8GFEnDuoJq0qy8BLeFU/UhIjYxzqIfXyxOn9OAtMJ+sI80yaWDkRcR7F6HZk9k3oIoLdhKN7hJ5LUvIlFbHn5094CQMkyGtdYTccK8rZgt9jpyuCKj5/2JLo6eOSfi2dVJdkB5FIKKd/xipFSuuf/E1qs+FcgqQkEWJK6m2S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qivS2t70Cjq/y53vWP04DmmWcVMZBDtant5X45/GX667sFjuRJyOGQBn+/dzPMKlTFzjwXFK89VN0Kvnu1I9jHfXg+/VwV+qZsNIpzrBuJgRDuXx7EBh+KF3r5Px1NyHwd9w/JDzHlofcybFPbevXFhMeUIzSB06c0gPb/g==,iv:uIkFIaapalHCkVXos8Mbhx/LaEIwJ7WuJINgSPDd2h0=,tag:bUUTo8axOdvZzAj+9DahMw==,type:str]
GLANCE_REDDIT_TABS: ENC[AES256_GCM,data:QQZECOydUwA+/z6yMYngQAYxLr8zPbbusg6h4I9ANF8/KnJBx80K0XOlWcMO/lJth8M9dZAuogjiefym0E7/dFPtu5aE/XrqJLK9Nbfs8hhm8uGXkZiVIgspn3cJvImmJ8xdzv76G+va6nMAEjjZj8kx08MSrYtilDuAHN+Kc6YZ11MUBpT/q5+F2KjTrE7WrJ/iv+fpiGQOFsFJk64gsXaDLGG77pzhNOF070ft4LVjioEhhNUTvYORwfdQY6rD4+glauXYDOKRs5jpji23MtyJvLA/q4KM0+VBZEEZZeHNSA3RUs4Arpw3idy+bHYPm2SPupfhrKUrrRbHktDzXzs5JMGENzvj4e93kB7WaG1mPk2juHBbbi6btgfGOGBWsh9IrTxsypojdnom9Q==,iv:c3H87DQ1C7//G0mSiYO5ex3yX+LMebDJoLdzXPQFMpg=,tag:48f+wXY8ZxOIsB/nNkm5HQ==,type:str]
GLANCE_TSP_SHEET_ID: ENC[AES256_GCM,data:MKjn3KO8V2ab6Bhz6LhUMrWLpk8jlO1q6jKgL+iJ/+JIA7AzWSmMJMA+yF4=,iv:pIkW3h/TU82xqHvxOQT7DeO/nzIjZLsAqBXT6pxZzGc=,tag:6jCrC4rNAdcHT1Y0cDlEww==,type:str]
GLANCE_GOOGLE_API_KEY: ENC[AES256_GCM,data:mM15yavKXHqJ0qRJVVewoG5zC/P9L3oCfc4RNEFruQkFvEa+Aag3,iv:SGfAQ0GJFOCKU9ymTuSka19qMoCOa8FGKvMSi2DCpf0=,tag:WW6BFfq6gqt3668YNNRMIw==,type:str]
MQTT_HA_PASSWORD: ENC[AES256_GCM,data:zET6fk1csjCNFtJCys8nBFsic0Um7CVi,iv:iiXQrpyhz4o81zGsC95YFfibMdY6JUAIfWpfYBR+T+w=,tag:9/brP1ATceaAL9AOPzVA0Q==,type:str]
MQTT_RING_PASSWORD: ENC[AES256_GCM,data:FanU7jvscjrueyn8c6t+r4zbdM1qBOba,iv:a4zJgsnIaSIMc/YubI9vEao208d5ZQZ3adjObH/E6As=,tag:lgcBQNUWP/fEvSuSZwn0NA==,type:str]
WALL_HA_TOKEN: ENC[AES256_GCM,data:5ePw/y9huCKlumjDoifRECIyDKyTSKfCsMbfM/bTuCeFP6re+kQrNbXWQQXrp9upwJyH+cMGPEYPsiUNPco19DtF1IyLdTAWVVMijrKvKSV+DoQGWuNwVz63VWeKvezX4CmJN5qqWO7pX4swnJuRB+oChLO5VTZMxcuw5r5Kg75FNTluZnhsF9/aOjqQFfijZQpfol58vXWbqgbY4j0nVP9zdiDdHrBreoOGZEZQIMXQWOnCq9DS,iv:QQ2wLrPPTQ9ka0mLofZE+k9fdbv12t8i/Fxm9tDtlp8=,tag:7SwrsqZyAX7yo6WkTs2nDg==,type:str]
Expand Down Expand Up @@ -146,8 +148,8 @@ sops:
cWFUOUk2ajZjLzJ3akI4b2NVa2x6WFUKCfpLOW4BYcdPB6/oUKS91hKK0bQ0ma8k
aLfyl0VnZz/iBAOImN/7l2sZPV/XY0lilPMjWWh4yGK27uDKhvDDtA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2026-11-25T17:41:00Z"
mac: ENC[AES256_GCM,data:p2Mqo9pst9dixWceMljdFlVDaOdSkpK7oso4uEiKiKOzZXsVkrMtgLRVdYLLJ/ouynEBY3vqzDpS+1zR3Quw/7q+GiFkCCCxJtgiAlH38BMi/7cmz88x1wvH2vMFAJ7RNoMBYZr0YKFbE158YzX9wTOkjq0jH2DeEqlMlWubE34=,iv:yWJsYxdmnqPNaCVgfCHgMc6wCJ0UZkpehIt71vLKVns=,tag:6hINPWQ08ZkhD5PiSBen7Q==,type:str]
lastmodified: "2026-11-25T18:48:36Z"
mac: ENC[AES256_GCM,data:T9XJIAGJ+kUmQvp71hgBR5QRq50gJ6ndPiJsUcybYSR7zCY5vEchSMWZuMDzBIE7EmSbF9HDf7kfZcUwb3dNHAoY3j1VoDq7yZwlqwDZvfhl5RUIFTt3yr3YlkCcs93VXbzLUVqtN3cCp7nTbJOv0CjLYUbUaVlTIk7B+SE74OE=,iv:HwKDTYsdK52COjxcQrCPlTO9tw/cXMMx4kWWitSUJI4=,tag:ulDSONRjCjme9ojHpRJ2kA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.4
11 changes: 10 additions & 1 deletion stacks/sensitive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ everything:
and trending repositories.
- **Watch** (`watch.yml`): the YouTube tabs at full width, as a grid.
- **Sports & Markets** (`sports.yml`): NBA, NFL, MLB and NHL scores from
ESPN, and the full ticker list with charts.
ESPN, the full ticker list with charts, and the TSP L 2060 fund with a
year's sparkline.
- **Homelab** (`homelab.yml`): a headline strip, the Estate panel, uptime
badges, hosts, every console by category, the household monitor and
Saruman's VMs.
Expand Down Expand Up @@ -681,6 +682,14 @@ is a file under `pages/`, an `$include` line in `glance.yml` and a mount in
`make secrets-edit STACK=sensitive`, edit the line, keep it on one line
with no single quote inside, then `make up STACK=sensitive`.
`secrets/sensitive.example.yaml` shows the shape of each.
- **The TSP fund comes from a Google Sheet.** Yahoo has no TSP fund, the
TSP's own price download refused a script with a 403, and Glance reads
JSON, not a web page. So the operator's sheet, which already imports a year
of daily prices from TSP Talk, feeds a second sheet holding only the date
and the L 2060 price. That one is shared by link, and Glance reads it from
`trinity` through the Sheets API with a key restricted to that API. The
portfolio sheet itself stays private. `GLANCE_TSP_SHEET_ID` and
`GLANCE_GOOGLE_API_KEY` are in SOPS, and the example file has the steps.
- **What is in the files is what anyone running this estate would see:** the
consoles and addresses `docs/network.md` already lists, the weather
(Bellevue, rounded to a city), Hacker News,
Expand Down
14 changes: 10 additions & 4 deletions stacks/sensitive/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1741,13 +1741,14 @@ services:
# and Miniflux's Fever endpoint each refused a placeholder key over
# verified TLS.
#
# The four credentials come from SOPS and Glance substitutes them into
# The five credentials come from SOPS and Glance substitutes them into
# the config as ${…}, each able to read and nothing else: the Prometheus
# reader token (query only), the Fever key of Miniflux's `glance` user
# (which follows nothing but public feeds), and, for the Household page's
# (which follows nothing but public feeds), for the Household page's
# two numbers, an Immich key with `server.statistics` alone and the token of
# Paperless's view-only `homepage` user. secrets/sensitive.example.yaml has
# the steps for each.
# Paperless's view-only `homepage` user, and a Google API key restricted to
# the Sheets API, which reads only sheets shared by link.
# secrets/sensitive.example.yaml has the steps for each.
#
# No depends_on, for Vaultwarden's reason.
glance:
Expand All @@ -1767,6 +1768,11 @@ services:
GLANCE_MINIFLUX_FEVER_KEY: ${GLANCE_MINIFLUX_FEVER_KEY:?set in secrets/sensitive.sops.yaml}
GLANCE_IMMICH_API_KEY: ${GLANCE_IMMICH_API_KEY:?set in secrets/sensitive.sops.yaml}
GLANCE_PAPERLESS_TOKEN: ${GLANCE_PAPERLESS_TOKEN:?set in secrets/sensitive.sops.yaml}
# The TSP widget on Sports & Markets: a Google API key restricted to the
# Sheets API, and the id of the link-shared sheet of public prices it
# reads. The id is in SOPS because the sheet is the operator's.
GLANCE_GOOGLE_API_KEY: ${GLANCE_GOOGLE_API_KEY:?set in secrets/sensitive.sops.yaml}
GLANCE_TSP_SHEET_ID: ${GLANCE_TSP_SHEET_ID:?set in secrets/sensitive.sops.yaml}
# The operator's own lists, one-line JSON that Glance substitutes into
# pages/home.yml (ADR-0100). Not credentials: in SOPS because this
# repository is public and they describe a person.
Expand Down
64 changes: 63 additions & 1 deletion stacks/sensitive/glance/pages/sports.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Sports & Markets. The tickers are GLANCE_MARKETS, shown here
# in full with their charts. The scoreboards are ESPN's public API, no key,
# one widget per league sharing the first one's template. Logos are left
# out: they would be the browser fetching from ESPN's CDN.
# out: they would be the browser fetching from ESPN's CDN. The TSP fund is
# not on Yahoo, so it is its own widget, read from a Google Sheet.
- name: Sports & Markets
slug: sports
width: wide
Expand Down Expand Up @@ -73,3 +74,64 @@
- type: markets
cache: 15m
markets: ${GLANCE_MARKETS}

# TSP L 2060: Yahoo has no TSP fund, and the TSP's own price download
# refuses a script (403, 2026-11-25). The operator's sheet already
# imports a year of daily prices from TSP Talk; a second sheet, shared
# by link and holding only the date and this fund's price, is read
# through the Sheets API with a key that can read nothing else. Both
# are in SOPS: secrets/sensitive.example.yaml has the steps. Rows come
# newest first. The sparkline is drawn here as inline SVG, so the
# browser fetches nothing for it. TSP prices once a day: 6h is plenty.
- type: custom-api
title: TSP L 2060
cache: 6h
url: https://sheets.googleapis.com/v4/spreadsheets/${GLANCE_TSP_SHEET_ID}/values/A1:B400
headers:
X-Goog-Api-Key: ${GLANCE_GOOGLE_API_KEY}
parameters:
valueRenderOption: UNFORMATTED_VALUE
dateTimeRenderOption: FORMATTED_STRING
template: |
{{ $rows := .JSON.Array "values" }}
{{ $n := len $rows }}
{{ if or (ne .Response.StatusCode 200) (lt $n 2) }}
<p class="color-negative">No prices: the sheet answered {{ .Response.StatusCode }} with {{ $n }} rows.</p>
{{ else }}
{{ $p := (index $rows 0).Float "1" }}
{{ $q := (index $rows 1).Float "1" }}
{{ $y0 := (index $rows (sub $n 1)).Float "1" }}
{{ $min := $p }}{{ $max := $p }}
{{ range $rows }}
{{ $v := .Float "1" }}
{{ if lt $v $min }}{{ $min = $v }}{{ end }}
{{ if gt $v $max }}{{ $max = $v }}{{ end }}
{{ end }}
{{ $span := sub $max $min }}{{ if le $span 0.0 }}{{ $span = 1.0 }}{{ end }}
{{ $step := div 300.0 (toFloat (sub $n 1)) }}
{{ $pts := "" }}
{{ range $i, $r := $rows }}
{{ $x := sub 300.0 (mul (toFloat $i) $step) }}
{{ $y := sub 58.0 (mul (div (sub ($r.Float "1") $min) $span) 56.0) }}
{{ $pts = printf "%s %.1f,%.1f" $pts $x $y }}
{{ end }}
{{ $day := mul (div (sub $p $q) $q) 100.0 }}
{{ $year := mul (div (sub $p $y0) $y0) 100.0 }}
<div class="flex justify-between items-end">
<div>
<div class="size-h3 color-highlight">{{ printf "$%.4f" $p }}</div>
<div class="size-h6">{{ (index $rows 0).String "0" }}</div>
</div>
<div class="text-right size-h6">
<div class="{{ if lt $day 0.0 }}color-negative{{ else }}color-positive{{ end }}">
{{ printf "%+.2f" $day }}% day</div>
<div class="{{ if lt $year 0.0 }}color-negative{{ else }}color-positive{{ end }}">
{{ printf "%+.2f" $year }}% over {{ $n }} days</div>
</div>
</div>
<svg viewBox="0 0 300 60" preserveAspectRatio="none" class="margin-top-10"
style="width: 100%; height: 60px;">
<polyline fill="none" stroke="var(--color-primary)" stroke-width="1.5"
vector-effect="non-scaling-stroke" points="{{ $pts }}"/>
</svg>
{{ end }}
Loading