add monitoring
This commit is contained in:
parent
7abc7e6c26
commit
c8f0058228
2 changed files with 61 additions and 0 deletions
42
hosts/monitoring/default.nix
Normal file
42
hosts/monitoring/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../common.nix
|
||||||
|
../../services/openssh.nix
|
||||||
|
../../services/nginx.nix
|
||||||
|
#./nginx.nix
|
||||||
|
#./prometheus.nix
|
||||||
|
#./grafana.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "monitoring";
|
||||||
|
firewall = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
80 # HTTP/1
|
||||||
|
443 # HTTP/2
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
443 # HTTP/3
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
openssh.banner = ''
|
||||||
|
__
|
||||||
|
__/\ \__ __
|
||||||
|
___ ___ ___ ___ /\_\ \ ,_\ ___ _ __ /\_\ ___ __
|
||||||
|
/' __` __`\ / __`\ /' _ `\/\ \ \ \/ / __`\/\`'__\/\ \ /' _ `\ /'_ `\
|
||||||
|
/\ \/\ \/\ \/\ \L\ \/\ \/\ \ \ \ \ \_/\ \L\ \ \ \/ \ \ \/\ \/\ \/\ \L\ \
|
||||||
|
\ \_\ \_\ \_\ \____/\ \_\ \_\ \_\ \__\ \____/\ \_\ \ \_\ \_\ \_\ \____ \
|
||||||
|
\/_/\/_/\/_/\/___/ \/_/\/_/\/_/\/__/\/___/ \/_/ \/_/\/_/\/_/\/___L\ \
|
||||||
|
/\____/
|
||||||
|
\_/__/
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
}
|
||||||
|
|
||||||
19
hosts/monitoring/nginx.nix
Normal file
19
hosts/monitoring/nginx.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.nginx.virtualHosts."monitoring.${config.networking.domain}" = {
|
||||||
|
default = true;
|
||||||
|
quic = true;
|
||||||
|
kTLS = true;
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
#basicAuthFile = config.age.secrets.grafana_basic_auth.path;
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
proxyPass = "http://";
|
||||||
|
recommendedProxySettings = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue