depot/third_party/nixpkgs/nixos/modules/services/desktops/gnome/tracker.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

66 lines
1.3 KiB
Nix

# Tracker daemon.
{ config, pkgs, lib, ... }:
let
cfg = config.services.gnome.tracker;
in
{
meta = {
maintainers = lib.teams.gnome.members;
};
###### interface
options = {
services.gnome.tracker = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Whether to enable Tracker services, a search engine,
search tool and metadata storage system.
'';
};
subcommandPackages = lib.mkOption {
type = lib.types.listOf lib.types.package;
default = [ ];
internal = true;
description = ''
List of packages containing tracker3 subcommands.
'';
};
};
};
###### implementation
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.tracker ];
services.dbus.packages = [ pkgs.tracker ];
systemd.packages = [ pkgs.tracker ];
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";
};
};
}