|
1 | | -{ lib, config, ... }: |
| 1 | +{ lib, config, pkgs, ... }: |
2 | 2 |
|
3 | | -{ |
| 3 | +let |
| 4 | + |
| 5 | + wireplumberConfig = { |
| 6 | + "10-disable-camera" = { |
| 7 | + "wireplumber.profiles" = { |
| 8 | + main = { |
| 9 | + "monitor.libcamera" = "disabled"; |
| 10 | + }; |
| 11 | + }; |
| 12 | + }; |
| 13 | + }; |
| 14 | + |
| 15 | + pipewireExtraConfig = { |
| 16 | + pipewire."10-umc404hd" = { |
| 17 | + "context.modules" = [ |
| 18 | + { |
| 19 | + name = "libpipewire-module-loopback"; |
| 20 | + args = { |
| 21 | + node.description = "UMC Speakers"; |
| 22 | + capture.props = { |
| 23 | + node.name = "UMC_Speakers"; |
| 24 | + media.class = "Audio/Sink"; |
| 25 | + audio.position = "FL,FR"; |
| 26 | + }; |
| 27 | + playback.props = { |
| 28 | + node.name = "playback.UMC_Speakers"; |
| 29 | + audio.position = "AUX0,AUX1"; |
| 30 | + target.object = "alsa_output.usb-BEHRINGER_UMC404HD_192k-00.pro-output-0"; |
| 31 | + stream.dont-remix = true; |
| 32 | + node.passive = true; |
| 33 | + }; |
| 34 | + }; |
| 35 | + } |
| 36 | + { |
| 37 | + name = "libpipewire-module-loopback"; |
| 38 | + args = { |
| 39 | + node.description = "UMC Headphones"; |
| 40 | + capture.props = { |
| 41 | + node.name = "UMC_Headphones"; |
| 42 | + media.class = "Audio/Sink"; |
| 43 | + audio.position = "FL,FR"; |
| 44 | + }; |
| 45 | + playback.props = { |
| 46 | + node.name = "playback.UMC_Headphones"; |
| 47 | + audio.position = "AUX2,AUX3"; |
| 48 | + target.object = "alsa_output.usb-BEHRINGER_UMC404HD_192k-00.pro-output-0"; |
| 49 | + stream.dont-remix = true; |
| 50 | + node.passive = true; |
| 51 | + }; |
| 52 | + }; |
| 53 | + } |
| 54 | + ]; |
| 55 | + }; |
| 56 | + |
| 57 | + pipewire."91-min-quantum" = { |
| 58 | + "context.properties" = { |
| 59 | + "default.clock.min-quantum" = 1024; |
| 60 | + }; |
| 61 | + }; |
| 62 | + |
| 63 | + # Configuration pour désactiver le microphone d'entrée par défaut |
| 64 | + pipewire."01-microphone" = { |
| 65 | + "context.filter" = { |
| 66 | + in.ports = [ "alsa_input.usb-..." ]; |
| 67 | + out.props = { "node.disable" = true; }; |
| 68 | + }; |
| 69 | + }; |
| 70 | + }; |
| 71 | + |
| 72 | +in { |
4 | 73 |
|
5 | 74 | options.glf.pipewire.enable = lib.mkOption { |
6 | 75 | description = "Enable GLF pipewire configurations"; |
|
11 | 80 | config = lib.mkIf config.glf.pipewire.enable { |
12 | 81 |
|
13 | 82 | security.rtkit.enable = true; |
| 83 | + |
14 | 84 | services.pipewire = { |
15 | 85 | enable = true; |
16 | | - |
| 86 | + |
17 | 87 | jack.enable = true; |
18 | 88 | pulse.enable = true; |
19 | 89 |
|
|
22 | 92 | support32Bit = true; |
23 | 93 | }; |
24 | 94 |
|
25 | | - wireplumber.extraConfig = { |
26 | | - "10-disable-camera" = { |
27 | | - "wireplumber.profiles" = { |
28 | | - main = { |
29 | | - "monitor.libcamera" = "disabled"; |
30 | | - }; |
31 | | - }; |
32 | | - }; |
33 | | - }; |
| 95 | + wireplumber.extraConfig = wireplumberConfig; |
| 96 | + |
| 97 | + extraConfig = pipewireExtraConfig; |
34 | 98 | }; |
35 | 99 |
|
36 | 100 | }; |
|
0 commit comments