From 99878eef4e97d7f26a66e291915d859251073bfb Mon Sep 17 00:00:00 2001 From: Lilly Date: Wed, 7 Jan 2026 13:28:49 +0000 Subject: [PATCH] Auto-commit: 2026-01-07 13:28:49 --- hosts/lillyserver/systemd.nix | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/hosts/lillyserver/systemd.nix b/hosts/lillyserver/systemd.nix index bdc05fd..8bef4a0 100644 --- a/hosts/lillyserver/systemd.nix +++ b/hosts/lillyserver/systemd.nix @@ -1,12 +1,25 @@ { pkgs, ... }: { - systemd.services.crowdsec-prefix = { - enable = true; - description = "Get IPv6 Prefix to add to Crowdsec Whitelist"; - serviceConfig = { - Type = "oneshot"; - ExecStart = "/mnt/lilly-ssd/appdata/crowdsec/crowdsec-prefix-change-script/checkprefix.sh"; - WorkingDirectory = "/mnt/lilly-ssd/appdata/crowdsec/crowdsec-prefix-change-script"; + systemd.services = { + crowdsec-prefix = { + enable = true; + description = "Get IPv6 Prefix to add to Crowdsec Whitelist"; + serviceConfig = { + Type = "oneshot"; + ExecStart = "/mnt/lilly-ssd/appdata/crowdsec/crowdsec-prefix-change-script/checkprefix.sh"; + WorkingDirectory = "/mnt/lilly-ssd/appdata/crowdsec/crowdsec-prefix-change-script"; + }; + }; + }; + systemd.timers = { + crowdsec-prefix = { + enable = true; + description = "Run Crowdsec-Prefix check regularly."; + timerConfig = { + OnCalendar = "*:0/5"; + Persistent = true; + }; + wantedBy = [ "timers.target" ]; }; }; }