1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 20:31:07 +01:00

feat(restic): run on makanek, prometheus

This commit is contained in:
2022-01-18 23:28:53 +01:00
parent bdc5c147dd
commit 30c2bfe598
5 changed files with 34 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
{ lib, config, pkgs, ... }:
let
inherit (import <niveum/lib>) kieran retiolumAddresses;
inherit (import <niveum/lib>) kieran retiolumAddresses restic;
in
{
imports = [
@@ -27,6 +27,21 @@ in
<niveum/modules/retiolum.nix>
];
services.restic.backups.niveum = {
initialize = true;
inherit (restic) repository;
timerConfig = { OnCalendar = "00:05"; RandomizedDelaySec = "5h"; };
passwordFile = toString <secrets/restic/password>;
paths = [
"/var/lib/codimd"
"/var/lib/postgresql"
"/var/lib/weechat"
"/var/lib/nextcloud"
"/var/lib/grafana"
"/var/lib/gitea"
];
};
networking = {
firewall.allowedTCPPorts = [ 80 443 ];
hostName = "makanek";

View File

@@ -2,6 +2,7 @@
let
lokiConfig = import ./loki.nix;
blackboxConfig = import ./blackbox.nix;
inherit (import <niveum/lib>) restic;
in
{
services.grafana = {
@@ -180,7 +181,10 @@ in
}
{
job_name = "zaatar";
static_configs = [ { targets = [ "zaatar.r:${toString config.services.prometheus.exporters.node.port}" ]; } ];
static_configs = [ { targets = [
"zaatar.r:${toString config.services.prometheus.exporters.node.port}"
"zaatar.r:${toString restic.port}"
]; } ];
}
];