2020-10-12 00:22:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
meta.maintainers = [ maintainers.pltanton ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
services.pasystray = { enable = mkEnableOption "PulseAudio system tray"; };
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.pasystray.enable {
|
|
|
|
systemd.user.services.pasystray = {
|
|
|
|
Unit = {
|
|
|
|
Description = "PulseAudio system tray";
|
2021-07-02 22:36:30 +00:00
|
|
|
Requires = [ "tray.target" ];
|
|
|
|
After = [ "graphical-session-pre.target" "tray.target" ];
|
2020-10-12 00:22:58 +00:00
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
Environment =
|
|
|
|
let toolPaths = makeBinPath [ pkgs.paprefs pkgs.pavucontrol ];
|
|
|
|
in [ "PATH=${toolPaths}" ];
|
|
|
|
ExecStart = "${pkgs.pasystray}/bin/pasystray";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|