modified: ../hosts/services/configuration.nix - change grafana
firewall port modified: grafana.nix - change caddy config to extraConfig
This commit is contained in:
parent
c2eeb342e9
commit
f3c3a48be7
|
@ -1,6 +1,7 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./firewall-services.nix
|
||||||
../modules/users.nix
|
../modules/users.nix
|
||||||
../modules/common.nix
|
../modules/common.nix
|
||||||
../modules/grafana.nix
|
../modules/grafana.nix
|
||||||
|
|
|
@ -5,24 +5,43 @@ in
|
||||||
{
|
{
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "sup.atlanticaweb";
|
domain = "sup.atlanticaweb.fr";
|
||||||
port = 2342;
|
port = 2342;
|
||||||
addr = "127.0.0.1";
|
addr = "127.0.0.1";
|
||||||
};
|
};
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = "lucazeau.alexandre@gmail.com";
|
email = "lucazeau.alexandre@gmail.com";
|
||||||
config = ''
|
extraConfig = ''
|
||||||
{
|
{
|
||||||
storage file_system {
|
storage file_system {
|
||||||
root ${caddyDir}
|
root ${caddyDir}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
https://grafana.atlanticaweb.fr {
|
https://sup.atlanticaweb.fr:2342 {
|
||||||
reverse_proxy http://127.0.0.1:${toString config.services.grafana.port}
|
reverse_proxy http://127.0.0.1:${toString config.services.grafana.port}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
services.prometheus = {
|
||||||
|
enable = true;
|
||||||
|
port = 9001;
|
||||||
|
exporters = {
|
||||||
|
node = {
|
||||||
|
enable = true;
|
||||||
|
enabledCollectors = [ "systemd" ];
|
||||||
|
port = 9002;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
scrapeConfigs = [
|
||||||
|
{
|
||||||
|
job_name = "services";
|
||||||
|
static_configs = [{
|
||||||
|
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
users.users.caddy = {
|
users.users.caddy = {
|
||||||
group = "caddy";
|
group = "caddy";
|
||||||
uid = config.ids.uids.caddy;
|
uid = config.ids.uids.caddy;
|
||||||
|
|
Loading…
Reference in New Issue