Compare commits
3 commits
290f541c5f
...
936d8f9090
Author | SHA1 | Date | |
---|---|---|---|
936d8f9090 | |||
49969059ec | |||
61f9e30242 |
3 changed files with 6 additions and 5 deletions
|
@ -36,6 +36,7 @@
|
||||||
services = {
|
services = {
|
||||||
forgejo.enable = true;
|
forgejo.enable = true;
|
||||||
grafana.enable = true;
|
grafana.enable = true;
|
||||||
|
prometheus.enable = true;
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
editors = {
|
editors = {
|
||||||
|
|
|
@ -50,19 +50,19 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
datasources.settings = {
|
datasources.settings = {
|
||||||
datasources = [
|
datasources = [
|
||||||
(mkIf config.modules.system.services.database.postgresql.enable {
|
(mkIf config.modules.system.services.prometheus.enable {
|
||||||
name = "Prometheus";
|
name = "Prometheus";
|
||||||
type = "prometheus";
|
type = "prometheus";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://127.0.0.1:4024";
|
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf config.modules.system.services.prometheus.enable {
|
(mkIf config.modules.system.services.database.postgresql.enable {
|
||||||
name = "PostgreSQL";
|
name = "PostgreSQL";
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
url = "http://127.0.0.1:${toString config.services.prometheus.exporters.postgres.port}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
|
|
||||||
cfg = config.modules.system.services.grafana;
|
cfg = config.modules.system.services.prometheus;
|
||||||
port = 4022;
|
port = 4022;
|
||||||
in {
|
in {
|
||||||
options.modules.system.services.prometheus.enable = mkEnableOption "Grafana, a graphing service";
|
options.modules.system.services.prometheus.enable = mkEnableOption "Grafana, a graphing service";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue