valheim: added ntfy-sh notification

This commit is contained in:
Tigor Hutasuhut 2024-10-11 10:01:12 +07:00
parent ef34dbb44f
commit 519fb5c078

View file

@ -11,8 +11,8 @@ let
gid = toString user.gid;
base_dir = "/var/lib/${name}";
in
{
config = mkIf (podman.enable && podman.${name}.enable) {
lib.mkMerge [
(mkIf (podman.${name}.enable) {
services.caddy.virtualHosts.${domain}.extraConfig = ''
reverse_proxy ${ip}:80
'';
@ -78,5 +78,13 @@ in
"io.containers.autoupdate" = "registry";
};
};
};
})
{
profile.services.ntfy-sh.client.settings.subscribe = [
{
topic = "valheim";
command = ''${pkgs.libnotify}/bin/notify-send --category=im.received --urgency=normal "$title" "$message"'';
}
];
}
]