ctucx.git: nixfiles

ctucx' nixfiles

commit 1bd5617a7651183042082e546d0d480e18a5e059
parent 6eed8b655ac1f2bf88e6be7a451a64afbbc3f8b1
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 3 Feb 2022 14:28:21 +0100

machines/lollo: backup vnstat database
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/machines/lollo/configuration.nix b/machines/lollo/configuration.nix
@@ -15,8 +15,12 @@
     ../../configurations/services/spotifyd.nix
     ../../configurations/services/restic-server.nix
     ./syncthing.nix
+    ./restic-vnstat.nix
   ];
 
+  age.secrets.restic-server-desastro.file = ../../secrets/restic-server/desastro.age;
+  age.secrets.restic-server-hector.file   = ../../secrets/restic-server/hector.age;
+
   boot.loader = {
     systemd-boot.enable      = true;
     efi.canTouchEfiVariables = true;
diff --git a/machines/lollo/restic-vnstat.nix b/machines/lollo/restic-vnstat.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+
+{
+
+  age.secrets.restic-vnstat.file = ../../secrets/lollo/restic/vnstat.age;
+
+  restic-backups.matrix-synapse = {
+    user         = "vnstatd";
+    passwordFile = config.age.secrets.restic-vnstat.path;
+    paths        = [ "/var/lib/vnstat" ];
+    targets      = [ "hector.ctu.cx" "desastro.ctu.cx" ];
+  };
+
+}