{ config, lib, pkgs, ... }: let cfg = config.os.srv.aide; in { options.os.srv.aide.enable = lib.mkEnableOption "enables aide checking"; config = lib.mkIf cfg.enable { systemd = { services.aide-check = { description = "Daily File Integrity Operational Check"; serviceConfig = { Type = "oneshot"; ExecStart = "${pkgs.aide}/bin/aide --check"; }; }; timers.aide-check = { wantedBy = [ "timers.target" ]; timerConfig = { OnCalendar = "daily"; Persistent = true; }; }; }; }; }