Attempting to get Telegram working with Healthchecks
This commit is contained in:
parent
df973e2bb9
commit
275fedcde2
|
@ -1,4 +1,54 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }:
|
||||||
|
# let
|
||||||
|
# py = pkgs.python3.override {
|
||||||
|
# packageOverrides = final: prev: {
|
||||||
|
# django = prev.django_4;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# pydantic-edge = py.pkgs.pydantic.overridePythonAttrs (oldAttrs: rec {
|
||||||
|
# version = "2.3.0";
|
||||||
|
# src = pkgs.fetchFromGitHub {
|
||||||
|
# owner = "pydantic";
|
||||||
|
# repo = "pydantic";
|
||||||
|
# rev = "refs/tags/v${version}";
|
||||||
|
# hash = "sha256-toqrWg8bYzc3UmvG/YmXawfmT8nqaA9fxy24k1cdj+M=";
|
||||||
|
# };
|
||||||
|
# patches = [ ];
|
||||||
|
# });
|
||||||
|
# healthchecks-edge = pkgs.healthchecks.overridePythonAttrs (oldAttrs: rec {
|
||||||
|
# version = "unstable-2023-09-24";
|
||||||
|
# pname = "healthchecksedge";
|
||||||
|
# src = pkgs.fetchFromGitHub {
|
||||||
|
# owner = "healthchecks";
|
||||||
|
# repo = "healthchecks";
|
||||||
|
# rev = "507fd840d8c83a1685c8cccf47c67f939f295da1";
|
||||||
|
# hash = "sha256-EBfZQ41kc/H2BgzCPW0QZ8Js2DHU3ps4U1YaTZnGqg8=";
|
||||||
|
# };
|
||||||
|
# propagatedBuildInputs = with py.pkgs; [
|
||||||
|
# apprise
|
||||||
|
# cron-descriptor
|
||||||
|
# cronsim
|
||||||
|
# django
|
||||||
|
# django-compressor
|
||||||
|
# fido2
|
||||||
|
# minio
|
||||||
|
# psycopg2
|
||||||
|
# pycurl
|
||||||
|
# pydantic-edge
|
||||||
|
# pyotp
|
||||||
|
# segno
|
||||||
|
# statsd
|
||||||
|
# whitenoise
|
||||||
|
# ];
|
||||||
|
# passthru = {
|
||||||
|
# # PYTHONPATH of all dependencies used by the package
|
||||||
|
# pythonPath = py.pkgs.makePythonPath propagatedBuildInputs;
|
||||||
|
# };
|
||||||
|
# doCheck = false;
|
||||||
|
# });
|
||||||
|
|
||||||
|
# in
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
./networking.nix # generated at runtime by nixos-infect
|
./networking.nix # generated at runtime by nixos-infect
|
||||||
|
@ -13,6 +63,12 @@
|
||||||
file = ../../secrets/fastmail-smtp.age;
|
file = ../../secrets/fastmail-smtp.age;
|
||||||
owner = "healthchecks";
|
owner = "healthchecks";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
age.secrets.healthchecks-telegram = {
|
||||||
|
file = ../../secrets/healthchecks-telegram.age;
|
||||||
|
owner = "healthchecks";
|
||||||
|
};
|
||||||
|
|
||||||
age.secrets.prometheus-webconfig-secret = {
|
age.secrets.prometheus-webconfig-secret = {
|
||||||
file = ../../secrets/monitoring-prometheus-webconfig.age;
|
file = ../../secrets/monitoring-prometheus-webconfig.age;
|
||||||
owner = "prometheus";
|
owner = "prometheus";
|
||||||
|
@ -179,14 +235,17 @@
|
||||||
|
|
||||||
services.healthchecks = {
|
services.healthchecks = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
# package = healthchecks-edge;
|
||||||
settings = {
|
settings = {
|
||||||
SECRET_KEY_FILE = config.age.secrets.healthchecks-secret.path;
|
SECRET_KEY_FILE = config.age.secrets.healthchecks-secret.path;
|
||||||
SITE_ROOT = "https://healthchecks.gmem.ca";
|
SITE_ROOT = "https://healthchecks.gmem.ca";
|
||||||
SITE_NAME = "Arch's Healthchecks";
|
SITE_NAME = "Archs Healthchecks";
|
||||||
EMAIL_HOST = "smtp.fastmail.com";
|
EMAIL_HOST = "smtp.fastmail.com";
|
||||||
EMAIL_HOST_PASSWORD_FILE = config.age.secrets.healthchecks-smtp.path;
|
EMAIL_HOST_PASSWORD_FILE = config.age.secrets.healthchecks-smtp.path;
|
||||||
EMAIL_HOST_USER = "g@gmem.ca";
|
EMAIL_HOST_USER = "g@gmem.ca";
|
||||||
DEFAULT_FROM_EMAIL = "healthchecks@gmem.ca";
|
DEFAULT_FROM_EMAIL = "healthchecks@gmem.ca";
|
||||||
|
TELEGRAM_BOT_NAME = "arch_healthchecks_bot";
|
||||||
|
TELEGRAM_TOKEN_FILE = config.age.secrets.healthchecks-telegram.path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,5 @@ in
|
||||||
"secrets/monitoring-prometheus-password.age".publicKeys = [ monitoring gsimmer ];
|
"secrets/monitoring-prometheus-password.age".publicKeys = [ monitoring gsimmer ];
|
||||||
"secrets/healthchecks-ping.sh.age".publicKeys = machines ++ users;
|
"secrets/healthchecks-ping.sh.age".publicKeys = machines ++ users;
|
||||||
"secrets/fastmail-smtp.age".publicKeys = machines ++ users;
|
"secrets/fastmail-smtp.age".publicKeys = machines ++ users;
|
||||||
|
"secrets/healthchecks-telegram.age".publicKeys = [ monitoring gsimmer ];
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue