summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2021-04-16 14:19:19 -0400
committerBen Sima <ben@bsima.me>2021-04-18 15:17:10 -0400
commitbfb347fecfde85ef08b74c9e9d57e99cd504beea (patch)
tree18376638b0e6e9589312d8b3afedbcc16f847deb
parent2369e861da3c925c1b90d0d3d3318351e4187e44 (diff)
gpg refresh timer
-rw-r--r--linux.nix14
1 files changed, 13 insertions, 1 deletions
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";
+ };
+ };
+ };
}