From bfb347fecfde85ef08b74c9e9d57e99cd504beea Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Fri, 16 Apr 2021 14:19:19 -0400 Subject: gpg refresh timer --- linux.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/linux.nix b/linux.nix index 7f2ec02..d86135e 100644 --- a/linux.nix +++ b/linux.nix @@ -356,7 +356,7 @@ in gpg-agent = { enable = true; - enableScDaemon = true; + enableScDaemon = true; # smart card support defaultCacheTtl = 1800; # 30 minutes maxCacheTtl = 7200; # 2 hours enableSshSupport = false; @@ -412,4 +412,16 @@ in enable = true; }; }; + + systemd.user = { + services = { + "gpg-refresh".Service.ExecStart = "${pkgs.gnupg}/bin/gpg --refresh"; + }; + timers = { + "gpg-refresh" = { + Install.WantedBy = ["timers.target"]; + Timer.OnCalendar = "daily"; + }; + }; + }; } -- cgit v1.2.3