From 745a6dfdf313939fe16175b726b5f4801ac37676 Mon Sep 17 00:00:00 2001 From: Nikita Bazulin Date: Sun, 10 Nov 2024 22:51:07 +0200 Subject: [PATCH] [GuiVM] add Audio Control systemctl service So the Audio Control is always up and able in system tray and by DBus Also fixes wrong dark theme of the app Signed-off-by: Nikita Bazulin --- flake.lock | 6 +++--- modules/common/services/desktop.nix | 2 +- modules/microvm/virtualization/microvm/guivm.nix | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 04c68dc30..26330790a 100644 --- a/flake.lock +++ b/flake.lock @@ -210,11 +210,11 @@ ] }, "locked": { - "lastModified": 1730959682, - "narHash": "sha256-Jx/c9MO3dQBSKXS1MqsafScfQ8uuzJYvc0zMilX6CYQ=", + "lastModified": 1733291815, + "narHash": "sha256-J2lWG+T99LjS3dTp4c4ZrQGfj4qq50mDNodv6gM4fzY=", "owner": "tiiuae", "repo": "ghafpkgs", - "rev": "0d8e48443c757d49f4a6d14abc8065c21f274d1d", + "rev": "39494827ae32568aab54868753add673ecec8390", "type": "github" }, "original": { diff --git a/modules/common/services/desktop.nix b/modules/common/services/desktop.nix index f3223588b..e4fbfc616 100644 --- a/modules/common/services/desktop.nix +++ b/modules/common/services/desktop.nix @@ -195,7 +195,7 @@ in { name = "Audio Control"; description = "System Audio Control"; - path = "${pkgs.ghaf-audio-control}/bin/GhafAudioControlStandalone --pulseaudio_server=audio-vm:${toString pulseaudioTcpControlPort}"; + path = "${pkgs.ghaf-audio-control}/bin/GhafAudioControlStandalone --pulseaudio_server=audio-vm:${toString pulseaudioTcpControlPort} --indicator_icon_name=preferences-sound"; icon = "preferences-sound"; } diff --git a/modules/microvm/virtualization/microvm/guivm.nix b/modules/microvm/virtualization/microvm/guivm.nix index bc6f5e18a..7ddedd443 100644 --- a/modules/microvm/virtualization/microvm/guivm.nix +++ b/modules/microvm/virtualization/microvm/guivm.nix @@ -251,6 +251,21 @@ let # We dont enable services.blueman because it adds blueman desktop entry services.dbus.packages = [ pkgs.blueman ]; systemd.packages = [ pkgs.blueman ]; + + systemd.user.services.audio-control = { + enable = true; + description = "Audio Control application"; + + serviceConfig = { + Type = "simple"; + Restart = "always"; + RestartSec = "5"; + ExecStart = "${pkgs.ghaf-audio-control}/bin/GhafAudioControlStandalone --pulseaudio_server=audio-vm:${toString config.ghaf.services.audio.pulseaudioTcpControlPort} --deamon_mode=true --indicator_icon_name=preferences-sound"; + }; + + partOf = [ "ghaf-session.target" ]; + wantedBy = [ "ghaf-session.target" ]; + }; } ) ];