diff --git a/modules/base/locate/default.nix b/modules/base/locate/default.nix index 436e2004..886e75f3 100644 --- a/modules/base/locate/default.nix +++ b/modules/base/locate/default.nix @@ -29,7 +29,6 @@ in { locateGroup ]; - # TODO: add timer systemd.services.locate = { wantedBy = ["default.target"]; serviceConfig = { @@ -41,6 +40,14 @@ in { }; }; + systemd.timers.locate = { + wantedBy = ["timers.target"]; + timerConfig = { + Unit = "locate.service"; + OnCalendar = "*-*-* *:0/10:50"; # Every 10 minutes + }; + }; + home-manager.users.${baseCfg.user}.programs.bash.shellAliases = { locate = "${pkgs.writeShellScriptBin "lct" '' exec ${locate} -d ${database} "$@" 2> >(grep -v "/var/cache/locatedb")