diff options
author | Anton Plotnikov <aplotnikov@openwaygroup.com> | 2018-08-21 16:52:45 +0300 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2018-08-22 23:17:47 +0200 |
commit | 90bcaaf582c46af65bcdc64de65ef6b0e571ac52 (patch) | |
tree | 275427fe7583863c5ad07f552121001dd03b3939 /modules | |
parent | da8307cd267452b85078607270b8c8493dfa1ce5 (diff) |
pasystray: add module
Diffstat (limited to 'modules')
-rw-r--r-- | modules/misc/news.nix | 7 | ||||
-rw-r--r-- | modules/modules.nix | 1 | ||||
-rw-r--r-- | modules/services/pasystray.nix | 31 |
3 files changed, 39 insertions, 0 deletions
diff --git a/modules/misc/news.nix b/modules/misc/news.nix index bcf0c766bfb..8e893658777 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -765,6 +765,13 @@ in A new module is available: 'programs.msmtp'. ''; } + + { + time = "2018-08-21T20:13:50+00:00"; + message = '' + A new module is available: 'services.pasystray'. + ''; + } ]; }; } diff --git a/modules/modules.nix b/modules/modules.nix index d08a418e3bb..914d275c376 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -71,6 +71,7 @@ let ./services/network-manager-applet.nix ./services/owncloud-client.nix ./services/parcellite.nix + ./services/pasystray.nix ./services/polybar.nix ./services/random-background.nix ./services/redshift.nix 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"; + }; + }; + }; +} |