Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1e9b1818f6ba
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c6748ef63f2e
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 2, 2019

  1. nixos/gdm: use Fedora's PulseAudio configuration

    This is needed to avoid GDM PulseAudio instance acting as a network
    source/sink or grabing the A2DP bluetooth sink making A2DP unusable
    for any other user. In the future having this fixed in PulseAudio
    would be preferred [0]. Current possible upstream fix could be [1].
    
    [0]: #61746 (comment)
    [1]: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/merge_requests/10
    abbradar authored and worldofpeace committed Jun 2, 2019
    Copy the full SHA
    00972dc View commit details
  2. Merge pull request #61746 from abbradar/gnome-pa

    nixos/gdm: use Fedora's PulseAudio configuration
    worldofpeace authored Jun 2, 2019
    Copy the full SHA
    c6748ef View commit details
Showing with 22 additions and 0 deletions.
  1. +22 −0 nixos/modules/services/x11/display-managers/gdm.nix
22 changes: 22 additions & 0 deletions nixos/modules/services/x11/display-managers/gdm.nix
Original file line number Diff line number Diff line change
@@ -14,6 +14,23 @@ let
exec "$@"
'';

# Solves problems like:
# https://wiki.archlinux.org/index.php/Talk:Bluetooth_headset#GDMs_pulseaudio_instance_captures_bluetooth_headset
# Instead of blacklisting plugins, we use Fedora's PulseAudio configuration for GDM:
# https://src.fedoraproject.org/rpms/gdm/blob/master/f/default.pa-for-gdm
pulseConfig = pkgs.writeText "default.pa" ''
load-module module-device-restore
load-module module-card-restore
load-module module-udev-detect
load-module module-native-protocol-unix
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-position-event-sounds
'';

in

{
@@ -126,6 +143,11 @@ in
GDM_X_SESSION_WRAPPER = "${xSessionWrapper}";
};
execCmd = "exec ${gdm}/bin/gdm";
preStart = optionalString config.hardware.pulseaudio.enable ''
mkdir -p /run/gdm/.config/pulse
ln -sf ${pulseConfig} /run/gdm/.config/pulse/default.pa
chown -R gdm:gdm /run/gdm/.config
'';
};

# Because sd_login_monitor_new requires /run/systemd/machines