playerctl: add daemon service
This commit is contained in:
parent
85d0639f0f
commit
14422223df
@ -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
nixos/modules/services/desktops/playerctld.nix
Normal file
32
nixos/modules/services/desktops/playerctld.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
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 ];
|
||||
}
|
Loading…
Reference in New Issue
Block a user