mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 01:44:40 +02:00
service/gitea: add monitoring & dashboard
This commit is contained in:
parent
3569df7826
commit
9991dfaf47
3 changed files with 1292 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
# self-hosted git service
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.services.gitea;
|
||||
domain = config.networking.domain;
|
||||
|
@ -25,6 +25,7 @@ in
|
|||
service.DISABLE_REGISTRATION = true;
|
||||
ui.DEFAULT_THEME = "arc-green";
|
||||
log.LEVEL = "Warn";
|
||||
metrics.ENABLED = config.services.prometheus.enable;
|
||||
};
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
@ -44,6 +45,31 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "gitea";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [ "127.0.0.1:${toString cfg.port}" ];
|
||||
labels = {
|
||||
instance = config.networking.hostName;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
services.grafana.provision = {
|
||||
dashboards.settings.providers = [
|
||||
{
|
||||
name = "Gitea";
|
||||
options.path = pkgs.grafana-dashboards.gitea;
|
||||
disableDeletion = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
webapps.apps.gitea = {
|
||||
dashboard = {
|
||||
name = "Code";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue