nix/hosts/marvin/services/grafana.nix
2022-09-12 15:43:40 -04:00

35 lines
1.4 KiB
Nix

{config, ...}: { services.grafana = {
enable = true;
domain = "stats.thehedgehog.me";
port = 6914;
addr = "0.0.0.0";
rootUrl = "https://stats.thehedgehog.me";
auth.google.enable = false;
auth.azuread.enable = false;
auth.disableLoginForm = true;
security = {
adminUser = "thehedgeh0g";
adminPasswordFile = config.age.secrets.grafana-admin.path;
};
smtp = {
enable = true;
user = "grafana@thehedgehog.me";
fromAddress = "grafana@thehedgehog.me";
host = "smtp.migadu.com:465";
passwordFile = config.age.secrets.grafana-smtp-password.path;
};
analytics.reporting.enable = false;
extraOptions = {
AUTH_GENERIC_OAUTH_NAME = "auth";
AUTH_GENERIC_OAUTH_ICON = "signin";
AUTH_GENERIC_OAUTH_ENABLED = "true";
AUTH_GENERIC_OAUTH_CLIENT_ID = "89f4607cf446a777a6b25ebde8731cdcb80b04c1";
AUTH_GENERIC_OAUTH_CLIENT_SECRET = "89eccaa8a31104c218df5cfe37c87f0ea0bbddcd1571bddb7f7fbf5a09045efd59c61f1caaa79483ad59aac2c19488b254acdaced47e66a6505865a14a63ac4a";
AUTH_GENERIC_OAUTH_AUTH_URL = "https://auth.thehedgehog.me/application/o/authorize/";
AUTH_GENERIC_OAUTH_TOKEN_URL = "https://auth.thehedgehog.me/application/o/token/";
AUTH_GENERIC_OAUTH_API_URL = "https://auth.thehedgehog.me/application/o/userinfo/";
AUTH_SIGNOUT_REDIRECT_URL = "https://auth.thehedgehog.me/if/session-end/stathog/";
AUTH_GENERIC_OAUTH_SCOPES = "openid profile email";
};
};}