add storage space check command

This commit is contained in:
Kopatz
2024-04-21 11:17:40 +02:00
parent 82ac1842af
commit e9cd6bfef0

View File

@@ -12,11 +12,18 @@ let
checkStorageSpace = pkgs.writeShellApplication {
name = "checkBackupStorageSpace";
text = ''
# Check how much space is used by the backup paths
echo "Checking storage space (small)..."
du -sh ${builtins.concatStringsSep " " backupPathsSmall}
echo "Checking storage space (medium)..."
du -sh ${builtins.concatStringsSep " " backupPathsMedium}
echo "Checking storage space (full)..."
du -sh ${builtins.concatStringsSep " " backupPathsFull}
''
};
in
{
environment.systemPackages = with pkgs; [ checkStorageSpace ];
age.secrets.restic-pw = {
file = ../secrets/restic-pw.age;
};