1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-12 03:51:07 +01:00

pasystray: add extraOptions

Allows a user to, for example, add the `-g` option.

Also add a basic test case.
This commit is contained in:
Motiejus Jakštys 2023-09-18 15:20:32 +03:00 committed by Robert Helgesson
parent feb7006159
commit 8045eb45a7
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 51 additions and 4 deletions

View file

@ -223,6 +223,7 @@ import nmt {
./modules/services/pantalaimon
./modules/services/parcellite
./modules/services/pass-secret-service
./modules/services/pasystray
./modules/services/pbgopy
./modules/services/picom
./modules/services/playerctld

View file

@ -0,0 +1 @@
{ pasystray-service = ./service.nix; }

View file

@ -0,0 +1,13 @@
[Install]
WantedBy=graphical-session.target
[Service]
Environment=PATH=@paprefs@/bin:@pavucontrol@/bin
ExecStart='@pasystray@/bin/pasystray' '-g'
[Unit]
After=graphical-session-pre.target
After=tray.target
Description=PulseAudio system tray
PartOf=graphical-session.target
Requires=tray.target

View file

@ -0,0 +1,19 @@
{ ... }:
{
services.pasystray = {
enable = true;
extraOptions = [ "-g" ];
};
test.stubs = {
pasystray = { };
paprefs = { };
pavucontrol = { };
};
nmt.script = ''
serviceFile=$(normalizeStorePaths home-files/.config/systemd/user/pasystray.service)
assertFileContent "$serviceFile" ${./expected.service}
'';
}