26 lines
682 B
Nix
26 lines
682 B
Nix
{ 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.timers = {
|
|
crowdsec-prefix = {
|
|
enable = true;
|
|
description = "Run Crowdsec-Prefix check regularly.";
|
|
timerConfig = {
|
|
OnCalendar = "*:0/5";
|
|
Persistent = true;
|
|
};
|
|
wantedBy = [ "timers.target" ];
|
|
};
|
|
};
|
|
}
|