2020-04-24 23:36:52 +00:00
|
|
|
# Tracker daemon.
|
|
|
|
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
let
|
|
|
|
cfg = config.services.gnome.tracker;
|
|
|
|
in
|
2020-04-24 23:36:52 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
maintainers = teams.gnome.members;
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
imports = [
|
|
|
|
# Added 2021-05-07
|
|
|
|
(mkRenamedOptionModule
|
|
|
|
[ "services" "gnome3" "tracker" "enable" ]
|
|
|
|
[ "services" "gnome" "tracker" "enable" ]
|
|
|
|
)
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
services.gnome.tracker = {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
2020-04-24 23:36:52 +00:00
|
|
|
Whether to enable Tracker services, a search engine,
|
|
|
|
search tool and metadata storage system.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
subcommandPackages = mkOption {
|
|
|
|
type = types.listOf types.package;
|
|
|
|
default = [ ];
|
|
|
|
internal = true;
|
2022-09-09 14:08:57 +00:00
|
|
|
description = lib.mdDoc ''
|
2022-01-13 20:06:32 +00:00
|
|
|
List of packages containing tracker3 subcommands.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
config = mkIf cfg.enable {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.tracker ];
|
|
|
|
|
|
|
|
services.dbus.packages = [ pkgs.tracker ];
|
|
|
|
|
|
|
|
systemd.packages = [ pkgs.tracker ];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
environment.variables = {
|
|
|
|
TRACKER_CLI_SUBCOMMANDS_DIR =
|
|
|
|
let
|
|
|
|
subcommandPackagesTree = pkgs.symlinkJoin {
|
|
|
|
name = "tracker-with-subcommands-${pkgs.tracker.version}";
|
|
|
|
paths = [ pkgs.tracker ] ++ cfg.subcommandPackages;
|
|
|
|
};
|
|
|
|
in
|
|
|
|
"${subcommandPackagesTree}/libexec/tracker3";
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|