system/roles/push-notifications.nix (view raw)
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 | {
config,
...
}:
{
age.secrets.ntfy.file = ../../secrets/ntfy.age;
services.ntfy-sh = {
enable = true;
settings = {
base-url = "https://ntfy.alin.ovh";
behind-proxy = true;
upstream-base-url = "https://ntfy.sh";
auth-default-access = "deny";
enable-login = true;
require-login = true;
};
environmentFile = config.age.secrets.ntfy.path;
};
services.caddy.virtualHosts = {
"ntfy.${config.networking.domain}" = {
extraConfig = ''
reverse_proxy ${config.services.ntfy-sh.settings.listen-http}
'';
};
};
}
|