diff --git a/nixos/system/hectic-lab/sentinèlla.nix b/nixos/system/hectic-lab/sentinèlla.nix index fd20c22..17a4c71 100644 --- a/nixos/system/hectic-lab/sentinèlla.nix +++ b/nixos/system/hectic-lab/sentinèlla.nix @@ -5,17 +5,31 @@ domain, sslOpts, ... -}: let +}: { config, ... }: let port = 5869; in { - hectic = { - services."sentinèlla".probe = { + hectic.services."sentinèlla" = { + probe = { enable = true; inherit port; }; + watcher = { + enable = true; + peersDns = "peers.${domain}"; + peersPort = port; + pollingIntervalSec = 60; + # TG_TOKEN= and TG_CHAT_ID= are set via this environment file + # Add the following to sus/hectic-lab.yaml under sentinèlla/watcher/: + # environment: | + # TG_TOKEN= + # TG_CHAT_ID= + environmentFile = config.sops.secrets."sentinèlla/watcher/environment".path; + }; }; - services.nginx = { + sops.secrets."sentinèlla/watcher/environment" = {}; + + services.nginx = { virtualHosts."probe.${domain}" = sslOpts // { forceSSL = true; locations."/" = {