depot/third_party/nixpkgs/nixos/modules/services/desktops/playerctld.nix
Default email 98eb3e9ef5 Project import generated by Copybara.
GitOrigin-RevId: 00d80d13810dbfea8ab4ed1009b09100cca86ba8
2024-07-01 15:47:52 +00:00

32 lines
653 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.playerctld;
in
{
options.services.playerctld = {
enable = lib.mkEnableOption "the playerctld daemon";
package = lib.mkPackageOption pkgs "playerctl" { };
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.playerctld = {
description = "Playerctld daemon to track media player activity";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "exec";
ExecStart = "${cfg.package}/bin/playerctld";
};
};
};
meta.maintainers = with lib.maintainers; [ aacebedo ];
}