From 8cab4201e3206f8b2490982ff39ef76068028e29 Mon Sep 17 00:00:00 2001 From: buffet Date: Mon, 17 Jun 2024 12:23:00 +0200 Subject: [PATCH] feat: add timer for secret thing --- hosts/ami/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/hosts/ami/default.nix b/hosts/ami/default.nix index c813f82..4b6784a 100644 --- a/hosts/ami/default.nix +++ b/hosts/ami/default.nix @@ -38,4 +38,23 @@ ]; services.syncthing.enable = true; + + systemd = { + services.register-thing = { + serviceConfig = { + Type = "oneshot"; + User = "maintainer"; + ExecStart = "/home/maintainer/register-thing/thing"; + }; + }; + + timers.register-thing = { + wantedBy = ["timers.target"]; + timerConfig = { + OnUnitActiveSec = "1m"; + RandomizedDelaySec = "1m"; + Unit = "register-thing"; + }; + }; + }; } -- 2.46.0