From b2691a751af633859e8b281bb8b3b3f61ddee034 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 14 Apr 2021 18:33:53 +0200 Subject: [PATCH] Push password-store changes daily to git --- modules/periodic.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/periodic.nix b/modules/periodic.nix index 45207d9..83683f2 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -60,4 +60,22 @@ }; }; + # Push password-store changes to git + systemd.user.services.password-store-push = { + description = "Push password-store changes to git"; + wantedBy = [ "default.target" ]; + path = [ pkgs.pass-wayland pkgs.git pkgs.gitAndTools.pass-git-helper ]; + script = "${pkgs.pass-wayland}/bin/pass git push"; + serviceConfig.Type = "oneshot"; + }; + + systemd.user.timers.password-store-push = { + description = "Daily password-store git push"; + wantedBy = [ "default.target" ]; + timerConfig = { + OnCalendar = "18:00:00"; + Unit = "password-store-push.service"; + }; + }; + }