cleverca22
11/22/2016 - 3:05 PM

configuration.nix

{ ... }:

{
  systemd.services.update-locatedb = {
    description = "Update Locate Database";
    path  = [ pkgs.su ];
    script = ''
      mkdir -m 0755 -p $(dirname ${toString cfg.output})
    '';
  };
  systemd.timers.update-locatedb = {
    description = "Update timer for locate database";
    partOf      = [ "update-locatedb.service" ];
    wantedBy    = [ "timers.target" ];
    timerConfig.OnCalendar = "2:15";
  };
}