nix-index service

This commit is contained in:
Filippo Berto 2022-05-09 18:30:01 +02:00
parent 0815962641
commit 61cba53b41
2 changed files with 24 additions and 0 deletions

View file

@ -1,7 +1,30 @@
{ pkgs, ... }:
{
programs.nix-index = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
systemd.user = {
services."nix-index" = {
Unit = {
Description = "Update the nix-locate database";
After = [ "network.target" ];
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
Type = "oneshot";
ExecStart = "${pkgs.nix-index}/bin/nix-index";
};
};
timers."nix-index" = {
Unit.Description = "Update the nix-locate database";
Time = { OnCalendar = "weekly"; Persistent = true; };
Install.WantedBy = [ "timers.target" ];
};
};
}

View file

@ -131,6 +131,7 @@
./modules/libinput-gestures.nix
./modules/mangohud.nix
./modules/megasync.nix
./modules/nix-index.nix
./modules/noti.nix
./modules/obs-studio.nix
./modules/office.nix