1
0

Compare commits

..

2 Commits

2 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,9 @@
networking.networkmanager.extraConfig = '' networking.networkmanager.extraConfig = ''
[connectivity] [connectivity]
uri=http://ping.clerie.de/nm-check.txt uri=http://ping.clerie.de/nm-check.txt
[global-dns]
searches=net.clerie.de
''; '';
} }

View File

@ -44,12 +44,10 @@ let
export RESTIC_PROGRESS_FPS=0.1 export RESTIC_PROGRESS_FPS=0.1
export RESTIC_CACHE_DIR=/var/cache/restic export RESTIC_CACHE_DIR=/var/cache/restic
restic snapshots || restic init restic snapshots --latest 1 || restic init
restic backup ${optionalString (jobOptions.exclude != []) "--exclude-file ${pkgs.writeText "clerie-backup-${jobName}-${targetName}-excludes" (concatStringsSep "\n" jobOptions.exclude)}"} ${escapeShellArgs jobOptions.paths} restic backup ${optionalString (jobOptions.exclude != []) "--exclude-file ${pkgs.writeText "clerie-backup-${jobName}-${targetName}-excludes" (concatStringsSep "\n" jobOptions.exclude)}"} ${escapeShellArgs jobOptions.paths}
restic check
${optionalString (config.clerie.monitoring.enable) '' ${optionalString (config.clerie.monitoring.enable) ''
echo "clerie_backup_last_successful_run_time{backup_job=\"${jobName}\", backup_target=\"${targetName}\"} $(date +%s)" > /var/lib/prometheus-node-exporter/textfiles/clerie-backup-${jobName}-${targetName}.prom echo "clerie_backup_last_successful_run_time{backup_job=\"${jobName}\", backup_target=\"${targetName}\"} $(date +%s)" > /var/lib/prometheus-node-exporter/textfiles/clerie-backup-${jobName}-${targetName}.prom
''} ''}