mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 19:51:34 +01:00
Enable healthchecks of restic-backups by default
This commit is contained in:
parent
41cd9f56f1
commit
cdeabbcc84
6 changed files with 4 additions and 15 deletions
|
|
@ -30,8 +30,6 @@ in
|
|||
|
||||
custom.services.resticBackups.actual = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
backupPrepareCommand = "${lib.getExe' pkgs.systemd "systemctl"} stop actual.service";
|
||||
backupCleanupCommand = "${lib.getExe' pkgs.systemd "systemctl"} start actual.service";
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ in
|
|||
|
||||
custom.services.resticBackups.forgejo = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
backupPrepareCommand = "${lib.getExe' pkgs.systemd "systemctl"} stop forgejo.service";
|
||||
backupCleanupCommand = "${lib.getExe' pkgs.systemd "systemctl"} start forgejo.service";
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@ in
|
|||
|
||||
custom.services.resticBackups.hedgedoc = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
backupPrepareCommand = "${lib.getExe' pkgs.systemd "systemctl"} stop hedgedoc.service";
|
||||
backupCleanupCommand = "${lib.getExe' pkgs.systemd "systemctl"} start hedgedoc.service";
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ in
|
|||
config = lib.mkIf cfg.backups.enable {
|
||||
custom.services.resticBackups.nextcloud = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
backupPrepareCommand = ''
|
||||
${lib.getExe' config.services.nextcloud.occ "nextcloud-occ"} maintenance:mode --on
|
||||
|
|
|
|||
|
|
@ -16,16 +16,15 @@ in
|
|||
options.custom.services.resticBackups = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule {
|
||||
options.healthchecks.enable = lib.mkEnableOption "";
|
||||
options.healthchecks.enable = lib.mkEnableOption "" // {
|
||||
default = true;
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
config = lib.mkIf (resticBackups != { }) {
|
||||
sops.secrets."healthchecks-ping-key" = {
|
||||
mode = "440";
|
||||
group = config.users.groups.backup.name;
|
||||
};
|
||||
sops.secrets."healthchecks-ping-key" = { };
|
||||
|
||||
systemd.services = lib.mkMerge [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ in
|
|||
|
||||
custom.services.resticBackups.syncthing = {
|
||||
inherit user;
|
||||
healthchecks.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
backupPrepareCommand = "${lib.getExe' pkgs.systemd "systemctl"} stop syncthing.service";
|
||||
backupCleanupCommand = "${lib.getExe' pkgs.systemd "systemctl"} start syncthing.service";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue