modules/monitoring: add loki and promtail

This commit is contained in:
xinyangli 2024-12-02 14:44:26 +08:00
parent 92db38383e
commit 4b5b41b05a
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
20 changed files with 406 additions and 86 deletions

View file

@ -1,12 +1,13 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./hardware-configurations.nix ];
imports = [
./hardware-configurations.nix
./services/gotosocial.nix
];
networking.hostName = "biotite";
networking.useNetworkd = true;
@ -20,11 +21,28 @@
address = [ "2a03:4000:4a:148::1/64" ];
};
networking.firewall.allowedTCPPorts = [
80
443
];
commonSettings = {
auth.enable = true;
autoupgrade.enable = true;
};
custom.monitoring = {
promtail.enable = true;
};
sops = {
defaultSopsFile = ./secrets.yaml;
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
};
services.caddy.enable = true;
services.tailscale.enable = true;
users.users.root.hashedPassword = "$y$j9T$NToEZWJBONjSgRnMd9Ur9/$o6n7a9b8eUILQz4d37oiHCCVnDJ8hZTZt.c.37zFfU.";
system.stateVersion = "24.11";