Don't ntfy for logrotate failures and add container names to ntfy alerts

This commit is contained in:
2026-03-13 20:00:09 -07:00
parent 4899a37a82
commit bd71d6e2f5
5 changed files with 20 additions and 3 deletions

View File

@@ -11,6 +11,7 @@ with lib;
let
cfg = config.pia-vpn;
hostName = config.networking.hostName;
mkContainer = name: ctr: {
autoStart = true;
@@ -28,6 +29,9 @@ let
config = { config, pkgs, lib, ... }: {
imports = allModules ++ [ ctr.config ];
ntfy-alerts.ignoredUnits = [ "logrotate" ];
ntfy-alerts.hostLabel = "${hostName}/${name}";
# Static IP with gateway pointing to VPN container
networking.useNetworkd = true;
systemd.network.enable = true;

View File

@@ -6,6 +6,7 @@ with lib;
let
cfg = config.pia-vpn;
hostName = config.networking.hostName;
scripts = import ./scripts.nix;
# Port forwarding derived state
@@ -98,6 +99,8 @@ in
# Route ntfy alerts through the host proxy (VPN container has no gateway on eth0)
ntfy-alerts.curlExtraArgs = "--proxy http://${cfg.hostAddress}:${toString cfg.proxyPort}";
ntfy-alerts.ignoredUnits = [ "logrotate" ];
ntfy-alerts.hostLabel = "${hostName}/pia-vpn";
# Enable forwarding so bridge traffic can go through WG
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;