modules/nixos/monitoring: switch to oauth-proxy for alertmanager

This commit is contained in:
zowoq 2024-11-24 11:31:47 +10:00
parent 3483677fcc
commit b01db30564
6 changed files with 50 additions and 34 deletions
modules/nixos/monitoring

View file

@ -0,0 +1,24 @@
{ config, inputs, ... }:
{
age.secrets.oauth2-proxy-key-file = {
file = "${inputs.self}/secrets/oauth2-proxy-key-file.age";
owner = "oauth2-proxy";
};
# https://oauth2-proxy.github.io/oauth2-proxy/configuration/providers/github
services.oauth2-proxy = {
enable = true;
provider = "github";
github = {
org = "nix-community";
team = "admin";
};
clientID = "Ov23liKOQPREko8sCk6F";
keyFile = config.age.secrets.oauth2-proxy-key-file.path;
nginx.domain = "alertmanager.nix-community.org";
nginx.virtualHosts = {
"alertmanager.nix-community.org" = { };
};
email.domains = [ "*" ];
};
}