nixfleet/hmModules/nix-index/default.nix
Andrea Ciceri a394b9cefd
All checks were successful
/ test (push) Successful in 32s
Reformat everything
2024-09-20 11:37:17 +02:00

36 lines
674 B
Nix

{
pkgs,
fleetFlake,
...
}:
{
programs.nix-index.enable = true;
systemd.user.services.nix-index-update = {
Unit = {
Description = "Update nix-index";
};
Service = {
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgs}";
};
};
systemd.user.timers.nix-index-update = {
Unit = {
Description = "Update nix-index";
};
Timer = {
Unit = "nix-index-update.service";
OnCalendar = "monday *-*-* 10:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
}