summaryrefslogtreecommitdiff
path: root/os/srv/aide.nix
blob: 8bd4c6a8addf2281c9efbcd9b241758132a04d1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  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;
        };
      };
    };
  };
}