Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions modules/common/services/audio/client.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ in
PULSE_SERVER = "${cfg.client.remotePulseServerAddress}";
};
};
services.pipewire.wireplumber.extraConfig."10-disable-bluez" = {
"wireplumber.profiles" = {
main = {
"monitor.bluez" = "disabled";
};
};
};
}
# givc socket proxy is declared in modules/givc/guivm.nix
(lib.mkIf (cfg.client.pipewireControl.enable && useGivc) {
Expand Down
4 changes: 0 additions & 4 deletions modules/desktop/graphics/cosmic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -419,17 +419,13 @@ in
Type = "simple";
Restart = "on-failure";
RestartSec = "5";
Environment = mkIf graphicsProfileCfg.bluetooth.applet.useDbusProxy "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/dbusproxy_snd.sock";
};
partOf = [ "cosmic-session.target" ];
wantedBy = [ "cosmic-session.target" ];
};

blueman-manager = {
inherit (graphicsProfileCfg.bluetooth.applet) enable;
serviceConfig = {
Environment = mkIf graphicsProfileCfg.bluetooth.applet.useDbusProxy "DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/dbusproxy_snd.sock";
};
};
};

Expand Down
41 changes: 37 additions & 4 deletions modules/givc/guivm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ in
];
Environment = [
"DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbusproxy_net.sock"
"NM_SECRET_AGENT_XML=${pkgs.networkmanager}/share/dbus-1/interfaces/org.freedesktop.NetworkManager.SecretAgent.xml"
];
ExecStart = [
''
Expand All @@ -137,15 +136,49 @@ in
--source-object-path /org/freedesktop/NetworkManager \
--proxy-bus-name org.freedesktop.NetworkManager \
--source-bus-type session \
--target-bus-type system
--target-bus-type system \
--log-level error
''
];
};
startLimitIntervalSec = 0;
wantedBy = [ "multi-user.target" ];
};

services.dbus.packages = [ pkgs.networkmanager ];
systemd.services.dbus-proxy-bluetooth = {
description = "DBus proxy for Bluetooth ${guivmName}";
# Wait for GIVC to create the socket before starting
after = [ "givc-${guivmName}.service" ];
requires = [ "givc-${guivmName}.service" ];
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = "1s";
# Wait up to 30 seconds for the socket to appear
ExecStartPre = [
"${pkgs.coreutils}/bin/timeout 30 ${pkgs.bash}/bin/bash -c 'until [ -S /tmp/dbusproxy_snd.sock ]; do sleep 0.5; done'"
];
Environment = [
"DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbusproxy_snd.sock"
];
ExecStart = [
''
${lib.getExe pkgs.dbus-proxy} \
--source-bus-name org.bluez \
--source-object-path /org/bluez \
--proxy-bus-name org.bluez \
--source-bus-type session \
--target-bus-type system \
--log-level error
''
];
};
startLimitIntervalSec = 0;
wantedBy = [ "multi-user.target" ];
};
services.dbus.packages = [
pkgs.bluez
pkgs.networkmanager
];
ghaf.security.audit.extraRules = [
"-w /etc/givc/ -p wa -k givc-${hostName}"
"-w /run/givc/ -p wa -k givc-${hostName}"
Expand Down
1 change: 0 additions & 1 deletion modules/reference/desktop/applications.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ in
description = "Manage Bluetooth Devices & Settings";
icon = "bluetooth-48";
exec = "${pkgs.writeShellScriptBin "bluetooth-settings" ''
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/dbusproxy_snd.sock \
PULSE_SERVER=audio-vm:${toString config.ghaf.services.audio.server.pulseaudioTcpControlPort} \
${pkgs.blueman}/bin/blueman-manager
''}/bin/bluetooth-settings";
Expand Down
Comment thread
brianmcgillion marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: 2022-2026 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
#
# This patch should be removed once the fix is merged upstream. See
# https://github.com/blueman-project/blueman/pull/3213/commits
#
From a063be21a67068eb09e6f5b14df2344eef2c756b Mon Sep 17 00:00:00 2001
From: jkuro-tii <jaroslaw.kurowski@tii.ae>
Date: Wed, 15 Apr 2026 10:44:36 +0400
Subject: [PATCH] blueman: fix agent registering

Signed-off-by: jkuro-tii <jaroslaw.kurowski@tii.ae>
---
blueman/bluez/AgentManager.py | 2 +-
blueman/bluez/Base.py | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/blueman/bluez/AgentManager.py b/blueman/bluez/AgentManager.py
index 9f266e1b..1fe249f1 100644
--- a/blueman/bluez/AgentManager.py
+++ b/blueman/bluez/AgentManager.py
@@ -13,7 +13,7 @@ class AgentManager(Base):

def register_agent(self, agent_path: str, capability: str = "", default: bool = False) -> None:
param = GLib.Variant('(os)', (agent_path, capability))
- self._call('RegisterAgent', param)
+ self._call_sync('RegisterAgent', param)
if default:
default_param = GLib.Variant('(o)', (agent_path,))
self._call('RequestDefaultAgent', default_param)
diff --git a/blueman/bluez/Base.py b/blueman/bluez/Base.py
index af645889..ab4ec9f6 100644
--- a/blueman/bluez/Base.py
+++ b/blueman/bluez/Base.py
@@ -94,6 +94,9 @@ class Base(GObject.Object, metaclass=BaseMeta):

self.__proxy.call(method, param, Gio.DBusCallFlags.NONE, GLib.MAXINT, None,
callback, reply_handler, error_handler)
+
+ def _call_sync(self, method: str, param: GLib.Variant | None = None) -> GLib.Variant | None:
+ return self.__proxy.call_sync(method, param, Gio.DBusCallFlags.NONE, -1, None)

def get(self, name: str) -> Any:
try:
--
2.53.0

7 changes: 7 additions & 0 deletions overlays/custom-packages/blueman-applet/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# SPDX-FileCopyrightText: 2022-2026 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
#
{ prev }:
prev.blueman.overrideAttrs {
patches = [ ./0001-blueman-applet-switch-register-agent-sync-call.patch ];
}

This file was deleted.

2 changes: 0 additions & 2 deletions overlays/custom-packages/cosmic/cosmic-applets/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ prev.cosmic-applets.overrideAttrs (oldAttrs: {
# audio and bluetooth patches should be removed when dbus-proxy allows
./0001-bluetooth-applet-hide-bluetooth-settings-button.patch
./0002-network-applet-hide-airplane-mode-toggle.patch
./0003-dont-use-secret-agent.patch
];
postInstall = oldAttrs.postInstall or "" + ''
sed -i 's|^Exec=.*|Exec=env PIPEWIRE_RUNTIME_DIR=/tmp cosmic-applet-audio|' $out/share/applications/com.system76.CosmicAppletAudio.desktop
sed -i 's|^Exec=.*|Exec=env DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/dbusproxy_snd.sock cosmic-applet-bluetooth|' $out/share/applications/com.system76.CosmicAppletBluetooth.desktop
'';
})

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
prev.cosmic-initial-setup.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches ++ [
./0001-Preselect-Ghaf-themes.patch
./0002-dont-use-secret-agent.patch
./0003-Hide-language-settings-show-location-settings.patch
];
# Don't install default cosmic themes and layouts
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions overlays/custom-packages/cosmic/cosmic-settings/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# Ref: https://github.com/pop-os/cosmic-settings/blob/master/cosmic-settings/Cargo.toml
{ prev }:
(prev.cosmic-settings.overrideAttrs (oldAttrs: {
patches = oldAttrs.patches ++ [
./0001-dont-use-secret-agent.patch
];
cargoBuildNoDefaultFeatures = true;
cargoBuildFeatures = [
"a11y"
Expand Down
1 change: 1 addition & 0 deletions overlays/custom-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#
# keep-sorted start skip_lines=1
(_final: prev: {
blueman = import ./blueman-applet { inherit prev; };
cosmic-applets = import ./cosmic/cosmic-applets { inherit prev; };
cosmic-comp = import ./cosmic/cosmic-comp { inherit prev; };
cosmic-greeter = import ./cosmic/cosmic-greeter { inherit prev; };
Expand Down
1 change: 0 additions & 1 deletion targets/vm/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ let
description = "Manage Bluetooth Devices & Settings";
icon = "bluetooth-48";
exec = "${pkgs.writeShellScriptBin "bluetooth-settings" ''
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/tmp/dbusproxy_snd.sock \
PULSE_SERVER=audio-vm:${toString config.ghaf.services.audio.server.pulseaudioTcpControlPort} \
${pkgs.blueman}/bin/blueman-manager
''}/bin/bluetooth-settings";
Expand Down
Loading