-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-examples.yml
More file actions
274 lines (251 loc) · 8.72 KB
/
config-examples.yml
File metadata and controls
274 lines (251 loc) · 8.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# ntfy-macos Configuration Examples
# Copy relevant sections to ~/.config/ntfy-macos/config.yml
#
# Note: Unknown keys in your config will trigger a warning in the menu bar.
# This helps catch typos like "icon_path" vs "iconpath" or misplaced options.
# Enable local notification server on localhost (optional)
# Scripts can POST to http://127.0.0.1:9292/notify to trigger notifications
# local_server_port: 9292
servers:
# ===========================================
# Home Automation (Home Assistant)
# ===========================================
- url: https://ntfy.sh
# Security: only allow homeassistant:// and https URLs
# Note: allowed_schemes REPLACES defaults - http is blocked here
allowed_schemes:
- https
- homeassistant
topics:
- name: homeassistant-alerts
icon_path: /Users/you/icons/homeassistant.png
actions:
- title: "Open Home Assistant"
type: view
url: "homeassistant://"
- title: "View Cameras"
type: view
url: "homeassistant://navigate/lovelace/cameras"
# ===========================================
# CI/CD Pipeline Notifications
# ===========================================
# IMPORTANT: Use a private server with authentication for script actions
# Never use auto_run_script or script actions with public ntfy.sh
- url: https://ntfy.yourcompany.com
token: tk_cicd_token
topics:
- name: github-actions
icon_symbol: hammer.fill
actions:
- title: "Open GitHub"
type: view
url: "https://github.com/youruser/yourrepo/actions"
- title: "Deploy"
type: script
path: /usr/local/bin/deploy.sh
- name: gitlab-ci
icon_symbol: arrow.triangle.branch
actions:
- title: "Open Pipeline"
type: view
url: "https://gitlab.com/yourgroup/yourproject/-/pipelines"
# ===========================================
# Server Monitoring
# ===========================================
- url: https://ntfy.myserver.com
token: tk_yourtoken
topics:
- name: server-alerts
icon_symbol: server.rack
actions:
- title: "SSH to Server"
type: script
path: /usr/local/bin/open-ssh.sh
- title: "View Grafana"
type: view
url: "https://grafana.myserver.com"
- name: disk-alerts
icon_symbol: externaldrive.fill
auto_run_script: /usr/local/bin/disk-cleanup.sh
actions:
- title: "View Dashboard"
type: view
url: "https://grafana.myserver.com/d/disk"
# ===========================================
# NAS / Synology
# ===========================================
- url: https://ntfy.sh
topics:
- name: synology
icon_path: /Users/you/icons/synology.png
actions:
- title: "Open DSM"
type: view
url: "https://nas.local:5001"
- title: "Download Station"
type: view
url: "https://nas.local:5001/webman/index.cgi?launchApp=SYNO.SDS.DownloadStation.Application"
# ===========================================
# Package Updates (view only - safe for public server)
# ===========================================
- url: https://ntfy.sh
topics:
- name: yt-dlp-releases
icon_symbol: arrow.down.circle.fill
click_url: "https://github.com/yt-dlp/yt-dlp/releases"
- name: homebrew-updates
icon_symbol: mug.fill
actions:
- title: "View Changelog"
type: view
url: "https://github.com/Homebrew/brew/releases"
# ===========================================
# Package Updates (with auto-update scripts - private server)
# ===========================================
- url: https://ntfy.home.local
token: tk_updates_token
topics:
- name: yt-dlp-releases
icon_symbol: arrow.down.circle.fill
auto_run_script: /usr/local/bin/update-yt-dlp.sh
- name: homebrew-updates
icon_symbol: mug.fill
auto_run_script: /usr/local/bin/brew-upgrade.sh
# ===========================================
# Security Alerts (private server required for scripts)
# ===========================================
- url: https://ntfy.secure.local
token: tk_security_token
topics:
- name: security-alerts
icon_symbol: lock.shield.fill
actions:
- title: "View Logs"
type: script
path: /usr/local/bin/view-security-logs.sh
- title: "Block IP"
type: script
path: /usr/local/bin/block-ip.sh
# ===========================================
# Background Processing (Silent) - private server required
# ===========================================
- url: https://ntfy.home.local
token: tk_automation_token
topics:
- name: backup-trigger
silent: true
auto_run_script: /usr/local/bin/run-backup.sh
- name: sync-trigger
silent: true
auto_run_script: /usr/local/bin/sync-files.sh
# ===========================================
# Smart Home Devices (private server for script actions)
# ===========================================
- url: https://ntfy.home.local
token: tk_smarthome_token
topics:
- name: doorbell
icon_symbol: video.doorbell.fill
actions:
- title: "View Camera"
type: view
url: "https://cameras.home.local/doorbell"
- title: "Unlock Door"
type: script
path: /usr/local/bin/unlock-door.sh
- name: garage
icon_symbol: car.fill
actions:
- title: "Open Garage"
type: script
path: /usr/local/bin/garage-toggle.sh
# ===========================================
# Development Tools (private server for script actions)
# ===========================================
- url: https://ntfy.dev.local
token: tk_dev_token
topics:
- name: build-complete
icon_symbol: checkmark.circle.fill
actions:
- title: "Open Xcode"
type: view
url: "xcode://"
- title: "Run Tests"
type: script
path: /usr/local/bin/run-tests.sh
- name: pr-review
icon_symbol: arrow.triangle.pull
actions:
- title: "Open PR"
type: view
url: "https://github.com/pulls"
# ===========================================
# macOS Shortcuts Integration
# ===========================================
- url: https://ntfy.home.local
token: tk_shortcuts_token
topics:
- name: automation
icon_symbol: wand.and.stars
actions:
- title: "Run Shortcut"
type: shortcut
name: "My Automation Shortcut"
- title: "Focus Mode"
type: shortcut
name: "Toggle Focus Mode"
# ===========================================
# AppleScript Actions
# ===========================================
- url: https://ntfy.home.local
token: tk_applescript_token
topics:
- name: media-control
icon_symbol: play.circle.fill
actions:
# Inline AppleScript
- title: "Pause Music"
type: applescript
script: 'tell application "Music" to pause'
# AppleScript file
- title: "Run Workflow"
type: applescript
path: /Users/you/Scripts/workflow.scpt
# ===========================================
# Fetch Missed Messages
# ===========================================
# Fetch messages that arrived while the app was not running
- url: https://ntfy.myserver.com
token: tk_yourtoken
fetch_missed: true # Enable for all topics on this server
topics:
- name: important-alerts
icon_symbol: exclamationmark.triangle.fill
- name: low-priority
fetch_missed: false # Override: disable for this topic
# ===========================================
# URL Security (allowed_schemes & allowed_domains)
# ===========================================
# Restrict which URLs can be opened from notifications
- url: https://ntfy.sh
# Only allow https URLs to specific domains
allowed_schemes:
- https
allowed_domains:
- github.com
- "*.example.com" # Wildcards supported
topics:
- name: restricted-alerts
icon_symbol: lock.fill
click_url: "https://github.com/myorg/myrepo"
# Allow custom app schemes (e.g., Home Assistant)
- url: https://ntfy.home.local
allowed_schemes:
- https
- homeassistant
- ssh # Allow ssh:// URLs
topics:
- name: home-automation
icon_symbol: house.fill
click_url: "homeassistant://"