From 1b200779b2d21744da8b469a751438e682e3893b Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 14 Jun 2022 19:36:18 +0200 Subject: [PATCH] services: postgresql-backup: enable with postgres --- hosts/hades/default.nix | 4 ---- hosts/poseidon/default.nix | 4 ---- services/postgresql-backup.nix | 4 +++- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/hosts/hades/default.nix b/hosts/hades/default.nix index 46d7524..a0bb987 100644 --- a/hosts/hades/default.nix +++ b/hosts/hades/default.nix @@ -73,10 +73,6 @@ in { privatePort = 8080; }; - postgresql-backup = { - enable = true; - }; - restic-backup = { enable = true; repo = "b2:hades-backup-alarsyo"; diff --git a/hosts/poseidon/default.nix b/hosts/poseidon/default.nix index 1e63889..22590a6 100644 --- a/hosts/poseidon/default.nix +++ b/hosts/poseidon/default.nix @@ -117,10 +117,6 @@ in { secretKeyFile = config.age.secrets."paperless/secret-key".path; }; - postgresql-backup = { - enable = true; - }; - tailscale = { enable = true; exitNode = true; diff --git a/services/postgresql-backup.nix b/services/postgresql-backup.nix index 0d8ec05..f5518af 100644 --- a/services/postgresql-backup.nix +++ b/services/postgresql-backup.nix @@ -13,7 +13,9 @@ cfg = config.my.services.postgresql-backup; in { options.my.services.postgresql-backup = { - enable = mkEnableOption "Backup SQL databases"; + enable = + (mkEnableOption "Backup SQL databases") + // {default = config.services.postgresql.enable;}; }; config = mkIf cfg.enable {