mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Add Prometheus
This commit is contained in:
parent
7728c6ce6a
commit
a0d026d222
7 changed files with 32 additions and 3 deletions
|
@ -8,13 +8,13 @@
|
|||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
users.users.root.passwordFile = config.age.secrets."cube.password.hash".path;
|
||||
users.users.root.passwordFile = config.age.secrets."cube.rgb.password.hash".path;
|
||||
|
||||
users.users.rgb = normalUser {
|
||||
description = "RGB";
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [ keys.rgbcube ];
|
||||
hashedPasswordFile = config.age.secrets."cube.password.hash".path;
|
||||
hashedPasswordFile = config.age.secrets."cube.rgb.password.hash".path;
|
||||
};
|
||||
})
|
||||
|
||||
|
|
|
@ -5,6 +5,18 @@ let
|
|||
|
||||
fqdn = "mail.${domain}";
|
||||
in serverSystemConfiguration {
|
||||
services.prometheus.exporters = {
|
||||
dmarc = enabled {
|
||||
imap.host = domain;
|
||||
imap.passwordFile = config.age.secrets."cube.mail.password".path;
|
||||
imap.username = "contact@${domain}";
|
||||
};
|
||||
|
||||
dovecot = enabled {};
|
||||
postfix = enabled {};
|
||||
rspamd = enabled {};
|
||||
};
|
||||
|
||||
mailserver = enabled {
|
||||
inherit fqdn;
|
||||
|
||||
|
|
|
@ -3,7 +3,14 @@
|
|||
serverSystemConfiguration {
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
services.prometheus.exporters = {
|
||||
nginxlog = enabled {};
|
||||
nginx = enabled {};
|
||||
};
|
||||
|
||||
services.nginx = enabled {
|
||||
statusPage = true;
|
||||
|
||||
recommendedGzipSettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedProxySettings = true;
|
||||
|
|
9
hosts/cube/prometheus.nix
Normal file
9
hosts/cube/prometheus.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ ulib, ... }: with ulib;
|
||||
|
||||
serverSystemConfiguration {
|
||||
services.prometheus = enabled {
|
||||
exporters.node = enabled {
|
||||
enabledCollectors = [ "systemd" ];
|
||||
};
|
||||
};
|
||||
}
|
BIN
secrets/cube.mail.password.age
Normal file
BIN
secrets/cube.mail.password.age
Normal file
Binary file not shown.
|
@ -5,7 +5,8 @@ rec {
|
|||
};
|
||||
|
||||
"acme.age".publicKeys = [ keys.cube ];
|
||||
"cube.password.hash.age".publicKeys = [ keys.cube ];
|
||||
"cube.rgb.password.hash.age".publicKeys = [ keys.cube ];
|
||||
"cube.mail.password.age".publicKeys = [ keys.cube ];
|
||||
"cube.mail.password.hash.age".publicKeys = [ keys.cube ];
|
||||
"cube.id.age".publicKeys = [ keys.rgbcube ];
|
||||
"enka.said.password.hash.age".publicKeys = [ keys.rgbcube ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue