diff options
Diffstat (limited to '')
-rw-r--r-- | modules/system/services/backup/default.nix (renamed from sys/svcs/backup/default.nix) | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/svcs/backup/default.nix b/modules/system/services/backup/default.nix index 91433bf9..705dcf23 100644 --- a/sys/svcs/backup/default.nix +++ b/modules/system/services/backup/default.nix @@ -9,16 +9,18 @@ ${pkgs.snap-sync-forked}/bin/snap-sync-forked --UUID "${cfg.backupDiskUuid}" --noconfirm; ${pkgs.util-linux}/bin/umount "/run/media/${cfg.backupDiskUuid}"; ''; - cfg = config.soispha.fs.backup; + + cfg = config.soispha.backup; in { - options.soispha.fs.backup = { - enable = lib.mkEnableOption (lib.mdDoc "backups with snap-sync"); + options.soispha.backup = { + enable = lib.mkEnableOption "backups with my forked snap-sync"; backupDiskUuid = lib.mkOption { type = lib.types.str; example = lib.literalExpression "d1d20ae7-3d8a-44da-86da-677dbbb10c89"; - description = lib.mdDoc "The UUID of the backup disk"; + description = "The UUID of the backup disk"; }; }; + config = lib.mkIf cfg.enable { systemd = { services.backup = { @@ -31,6 +33,7 @@ in { ExecStart = "${backup-script}/bin/backsnap"; }; }; + timers.backup = { wantedBy = ["timers.target"]; unitConfig = { |