Unverified Commit f4ebfc29 authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

Merge pull request #200654 from aacebedo/aacebedo/playerctld

playerctl: add daemon service
parents 07945731 8a76b625
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@

- [wg-access-server](https://github.com/freifunkMUC/wg-access-server/), an all-in-one WireGuard VPN solution with a web ui for connecting devices. Available at [services.wg-access-server](#opt-services.wg-access-server.enable).

- [Playerctld](https://github.com/altdesktop/playerctl), a daemon to track media player activity. Available as [services.playerctld](option.html#opt-services.playerctld).

## Backward Incompatibilities {#sec-release-24.11-incompatibilities}

- `transmission` package has been aliased with a `trace` warning to `transmission_3`. Since [Transmission 4 has been released last year](https://github.com/transmission/transmission/releases/tag/4.0.0), and Transmission 3 will eventually go away, it was decided perform this warning alias to make people aware of the new version. The `services.transmission.package` defaults to `transmission_3` as well because the upgrade can cause data loss in certain specific usage patterns (examples: [#5153](https://github.com/transmission/transmission/issues/5153), [#6796](https://github.com/transmission/transmission/issues/6796)). Please make sure to back up to your data directory per your usage:
+1 −0
Original line number Diff line number Diff line
@@ -487,6 +487,7 @@
  ./services/desktops/espanso.nix
  ./services/desktops/flatpak.nix
  ./services/desktops/geoclue2.nix
  ./services/desktops/playerctld.nix
  ./services/desktops/gnome/at-spi2-core.nix
  ./services/desktops/gnome/evolution-data-server.nix
  ./services/desktops/gnome/glib-networking.nix
+32 −0
Original line number Diff line number Diff line
{
  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 ];
}