feat: ntfy

This commit is contained in:
Lewis Wynne 2026-04-08 01:09:08 +01:00
parent 3f873c855f
commit 7fbfa53d4f
2 changed files with 32 additions and 0 deletions

View file

@ -12,6 +12,7 @@
./uptime-kuma.nix
./tinyauth.nix
./shlink.nix
./ntfy.nix
];
networking.hostName = "lab";

31
hosts/lab/ntfy.nix Normal file
View file

@ -0,0 +1,31 @@
{ ... }:
{
services.caddy.virtualHosts."ntfy.ily.rs" = {
extraConfig = ''
reverse_proxy localhost:8082
encode zstd gzip
'';
};
virtualisation.oci-containers.containers.ntfy = {
image = "binwiederhier/ntfy:v2.13.0";
podman.user = "podman";
cmd = [ "serve" ];
ports = [ "127.0.0.1:8082:80" ];
volumes = [
"/srv/ntfy/cache:/var/cache/ntfy"
];
environment = {
NTFY_BASE_URL = "https://ntfy.ily.rs";
NTFY_CACHE_FILE = "/var/cache/ntfy/cache.db";
NTFY_BEHIND_PROXY = "true";
};
};
systemd.tmpfiles.rules = [
"d /srv/ntfy/cache 0750 podman podman -"
];
# Workaround for NixOS/nixpkgs#410857 until backport of #475089 lands
systemd.services.podman-ntfy.serviceConfig.Delegate = true;
}