-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/dbus: support dbus-broker #122547
nixos/dbus: support dbus-broker #122547
Conversation
So I am running this on my system now. If people want to try it out, feel free :) @ilya-fedin since you have written your own module, is something important missing from this pr / do you have suggestions? |
I don't think so, my module feels like a hack comparing to that one :) |
Ok, so I ran a few tests on branch which defaults to the broker imp. (on top of this). |
@xaverdh how's it going? |
I marked this as stale due to inactivity. → More info |
I think this is still important |
is there a reason this is draft? After conflicts are resolved would this be good to go? |
The |
this module doesn't add |
Maybe dunstctl should be fixed then? Personally I don't use dbus-send and I absolutely don't need anything other than libdbus for applications. |
you're right, it should be added to dunst's dependencies. my intention was to bring awareness to the fact that this is a breaking change in behavior between |
while updating my system with this, it stopped |
Indeed. Not sure why |
Even if I explicitly add cc @flokli might know what is happening here? |
Maybe we should just use |
Can you check, if this is still the case? |
b1303ae
to
00952f4
Compare
But its not |
Ok, maybe I misstated it above. Its not so much about |
This makes me think, we probably should set |
ahh gotcha!
Agreed then, that sounds reasonable |
Ok, so I set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After a bit of testing, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been running this full-time on my laptop for a while now and after the reloadIfChanged
issue was fixed, I've had no problems since
Anyone disagree about merging this? |
@@ -520,7 +520,7 @@ in | |||
"systemd/system-shutdown" = { source = hooks "shutdown" cfg.shutdown; }; | |||
}); | |||
|
|||
services.dbus.enable = true; | |||
services.dbus.enable = mkDefault true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not feel very good about mkDefault
for a critical dependency like this. But I am not sure how else to implement this other than with services.dbus.implementation = lib.mkOption { type = lib.mkEnum [ "dbus" "dbus-broker" ]; }
which is not particularly nice either. So do not take this as NAK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good remark
An alternative would be services.dbus.broker = true
, or maybe even services.dbus.broker.enable = true
to allow for potential broker-specific options under services.dbus.broker
(which I'm not sure will ever be needed).
However these look like they enable something in the existing dbus daemon rather than replace it entirely, so services.dbus.implementation = "dbus-broker"
as you suggested makes more sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mkDefault
s should be removed as well, then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And mkIf cfg.enable
can now be moved to wrap the entire config:
config = mkIf cfg.enable (mkMerge [
{
…
}
(mkIf (cfg.implementation == "dbus") {
…
})
(mkIf (cfg.implementation == "dbus-broker") {
…
})
]);
Looking at the D-Bus derivation's source code, it seems
Should we choose one and stick to it? |
Please rebase on master |
done. |
I just tried this out. And not only is my laptop fine, but I also noticed a 10% increase in CPU power, 2 hours additional battery time, the sun shining significantly sharper and my long lost dog has finally returned. Very nice work all. Merging this and if we need to clean anything else up and possibly change the default, we can always do that. |
Per @mweinelt in #dev:nixos.org (Matrix), this can be backported for inclusion in 22.11 if it does not change default behavior If you are both comfortable with that @xaverdh and @peterhoeg, I would like for it to be backported for the upcoming release |
would be good to get this tested before so we can evaluate if we want this by default. |
Successfully created backport PR #202365 for |
agreed! |
Motivation for this change
picking up #112879
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)