-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AudioVM and client configuration with separate VM audio chennels
Signed-off-by: Jon Sahlberg <jon.sahlberg@unikie.com>
- Loading branch information
Showing
8 changed files
with
143 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,7 @@ | |
(rmDesktopEntries [ | ||
pkgs.waypipe | ||
pkgs.networkmanagerapplet | ||
pkgs.myxer | ||
]) | ||
++ [ | ||
pkgs.nm-launcher | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
pkgs, | ||
config, | ||
vmName, | ||
... | ||
}: let | ||
speakerName = "${vmName}.speaker"; | ||
micName = "${vmName}.mic"; | ||
in { | ||
# packages = [ | ||
# pkgs.pulseaudio | ||
# pkgs.pamixer | ||
# ]; | ||
|
||
# Enable pulseaudio for application VM | ||
security.rtkit.enable = true; | ||
sound.enable = true; | ||
users.extraUsers.ghaf.extraGroups = ["audio" "video"]; | ||
|
||
hardware.pulseaudio = { | ||
enable = true; | ||
extraConfig = " | ||
load-module module-tunnel-sink sink=${speakerName} sink_name=${speakerName} server=audio-vm:4713 format=s16le channels=2 rate=48000 | ||
load-module module-tunnel-source source=${micName} source_name=${micName} server=audio-vm:4713 format=s16le channels=1 rate=48000 | ||
# Set sink and source default max volume to about 90% (0-65536) | ||
set-sink-volume ${speakerName} 60000 | ||
set-source-volume ${micName} 60000 | ||
"; | ||
}; | ||
} |