feat(locate): add timer
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
d172a82805
commit
85cae813e0
1 changed files with 8 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Reference in a new issue