42 lines
930 B
Nix

{ config, ... }:
let
workDir = "/srv/containers/ntfy";
in
{
systemd.tmpfiles.rules = [
"d ${workDir} 2775 root admin"
];
virtualisation.oci-containers.containers.ntfy = {
autoStart = true;
image = "binwiederhier/ntfy:latest";
ports = [
"0.0.0.0:10000:80"
];
volumes = [
"${workDir}:/var/lib/ntfy"
];
cmd = [ "serve" ];
environment = {
NTFY_BASE_URL = "https://ntfy.isan.ro";
NTFY_CACHE_FILE = "/var/lib/ntfy/cache.db";
NTFY_AUTH_FILE = "/var/lib/ntfy/auth.db";
NTFY_AUTH_DEFAULT_ACCESS = "read-write";
NTFY_BEHIND_PROXY = "true";
NTFY_ATTACHMENT_CACHE_DIR = "/var/lib/ntfy/attachments";
NTFY_ENABLE_LOGIN = "true";
TZ = "Europe/Bucharest";
UID = "1000";
GID = "10000";
};
};
}