aboutsummaryrefslogtreecommitdiff
path: root/modules/services/pasystray.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/services/pasystray.nix')
-rw-r--r--modules/services/pasystray.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/modules/services/pasystray.nix b/modules/services/pasystray.nix
new file mode 100644
index 00000000000..da0436b665a
--- /dev/null
+++ b/modules/services/pasystray.nix
@@ -0,0 +1,31 @@
+{ 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";
+ After = [ "graphical-session-pre.target" ];
+ PartOf = [ "graphical-session.target" ];
+ };
+
+ Install = {
+ WantedBy = [ "graphical-session.target" ];
+ };
+
+ Service = {
+ ExecStart = "${pkgs.pasystray}/bin/pasystray";
+ };
+ };
+ };
+}