feat: db & git backups, bots on matrix, proxmox monitors, ...

This commit is contained in:
Xavier Morel
2025-11-19 22:01:27 +01:00
parent 4035967f21
commit e7aa43acaf
17 changed files with 116 additions and 21 deletions

View File

@@ -15,4 +15,13 @@
checkConfig = true;
initialScript = config.age.secrets.db-postgres-initscript.path;
};
# TODO: Manually add /mnt/backups mountpoint => NAS backup folder (with rotation on the NAS)
services.postgresqlBackup = {
enable = true;
backupAll = true;
compression = "gzip";
compressionLevel = 6;
location = "/mnt/backups/postgresql";
};
}

View File

@@ -16,11 +16,16 @@
host = tools.build_ip "db";
createDatabase = false;
};
# TODO: dump ...
settings = {
server.HTTP_PORT = 3000;
};
# user = "git";
dump = {
enable = true;
# TODO: Manual mountpoint /mnt/backups => NAS
backupDir = "/mnt/backups/gitea";
interval = "1:42";
type = "tar.gz";
};
};
# gitea-actions-runner.instances.default = {
# enable = true;

23
config/matrix-maubot.nix Normal file
View File

@@ -0,0 +1,23 @@
{
pkgs,
config,
tools,
...
}:
{
nixpkgs.config.permittedInsecurePackages = [
"olm-3.2.16"
];
environment.etc."maubot/config.base.yaml".source = config.age.secrets.matrix-maubot-cfg.path;
services.maubot = {
enable = true;
plugins = with config.services.maubot.package.plugins; [
rss
hasswebhookbot
];
configMutable = true;
# RIP the auto configuration ... Built a base yaml, written in agenix, and manually copying this to the config.yaml file + adapting as needed...
extraConfigFile = "/etc/maubot/config.yaml";
};
}

View File

@@ -15,6 +15,20 @@ in
"--web.enable-remote-write-receiver"
"--storage.tsdb.retention.time=${config.globals.retention}"
];
exporters.pve = {
enable = true;
collectors = {
cluster = true;
config = false;
node = true;
replication = false;
resources = true;
status = true;
version = true;
};
configFile = config.age.secrets.metrics-pve.path;
port = 9221;
};
globalConfig = {
scrape_interval = "30s";
};
@@ -30,6 +44,14 @@ in
service = "prometheus";
};
}
{
targets = [ "localhost:9221" ];
labels = {
host = tools.build_hostname "proxmox";
host_ip = tools.build_ip "proxmox";
service = "proxmox";
};
}
];
}
]