Nix-index: remove service and timer
This commit is contained in:
parent
dee271511d
commit
7d37638946
1 changed files with 1 additions and 24 deletions
|
|
@ -1,31 +1,8 @@
|
||||||
{ config, lib, ... }: {
|
{
|
||||||
programs.nix-index = {
|
programs.nix-index = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# package = pkgs.unstable_pkgs.nix-index;
|
# package = pkgs.unstable_pkgs.nix-index;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user = lib.attrsets.optionalAttrs config.programs.nix-index.enable {
|
|
||||||
services."nix-index" = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Update the nix-locate database";
|
|
||||||
After = [ "network.target" ];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "oneshot";
|
|
||||||
ExecStart = "${config.programs.nix-index.package}/bin/nix-index";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
timers."nix-index" = {
|
|
||||||
Unit.Description = "Daily update the nix-locate database";
|
|
||||||
Timer = {
|
|
||||||
OnCalendar = "daily";
|
|
||||||
Persistent = true;
|
|
||||||
Unit = "nix-index.service";
|
|
||||||
};
|
|
||||||
Install.WantedBy = [ "timers.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue