Merge pull request #153398 from jtojnar/tracker-subcommands
nixos/tracker: Define env var so it can find miners’ subcommands
This commit is contained in:
commit
67879a9353
2 changed files with 26 additions and 1 deletions
|
@ -47,6 +47,8 @@ with lib;
|
|||
|
||||
systemd.packages = [ pkgs.tracker-miners ];
|
||||
|
||||
services.gnome.tracker.subcommandPackages = [ pkgs.tracker-miners ];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.gnome.tracker;
|
||||
in
|
||||
{
|
||||
|
||||
meta = {
|
||||
|
@ -33,6 +36,15 @@ with lib;
|
|||
'';
|
||||
};
|
||||
|
||||
subcommandPackages = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [ ];
|
||||
internal = true;
|
||||
description = ''
|
||||
List of packages containing tracker3 subcommands.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -40,7 +52,7 @@ with lib;
|
|||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.gnome.tracker.enable {
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.tracker ];
|
||||
|
||||
|
@ -48,6 +60,17 @@ with lib;
|
|||
|
||||
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";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue