ntfy
Examples
Simple
{
ntfy.enable = true;
}With Authentication
{config, ...}: {
ntfy = {
enable = true;
settings = {
enable-login = true;
auth-default-access = "deny-all";
auth-users = [
"admin:{{ file.Read `${config.sops.secrets."users/admin/password_bcrypt".path}` }}:admin"
"monitoring:{{ file.Read `${config.sops.secrets."users/monitoring/password_bcrypt".path}` }}:user"
];
auth-access = [
"monitoring:monitoring:rw"
];
auth-tokens = [
"monitoring:{{ file.Read `${config.sops.secrets."users/monitoring/ntfy_access_token".path}` }}"
];
};
};
}Stack Options
nps.stacks.ntfy.containers.ntfy
Alias of {option}services.podman.containers.ntfy.
nps.stacks.ntfy.enable
Whether to enable ntfy.
nps.stacks.ntfy.enableGrafanaDashboard
Whether to enable Grafana Dashboard.
nps.stacks.ntfy.enablePrometheusExport
Whether to enable Prometheus Export.
nps.stacks.ntfy.extraEnv
Extra environment variables to set for the container. Variables can be either set directly or sourced from a file (e.g. for secrets).
For example in order to enable web push support, make sure you pass the 'NTFY_WEB_PUSH_PUBLIC_KEY',
'NTFY_WEB_PUSH_PRIVATE_KEY' & 'NTFY_WEB_PUSH_EMAIL_ADDRESS' variables.
Keys can be generated by running podman run --rm docker.io/binwiederhier/ntfy:latest webpush keys
attribute set of (null or boolean or signed integer or string or absolute path or (submodule))
nps.stacks.ntfy.settings
Server configuration (alternative to environment variable based configuration).
Will be mounted as /etc/ntfy/server.yml in the container.
The final configuration file will be templated with gomplate, so secrets can be read from files or environment variables.
See
YAML 1.1 value
{ }
{
auth-default-access = "deny-all";
enable-login = true;
web-push-private-key = "{{ file.Read `/run/secrets/web_push_private_key` }}";
}