dbus: ignores configuration in `/usr/share/dbus-1`
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 26.2k
- Forks
- 20.1k
- PR merge metrics
- PR metrics pending
Description
Nixpkgs version
- Stable (25.05)
Describe the bug
dbus ignores any unit files in /usr/share/dbus-1. This means that using nixpkgs dbus outside of NixOS requires awkward contortions to place all the unit files in /etc, regardless of where the upstream puts them and regardless of whether they should be located there.
I have not checked dbus-broker but I believe the same applies there.
Steps to reproduce
Use nixpkgs dbus on a system where system-provided unit files are in /usr/lib as per FHS and systemd documentation. The dbus daemon will not start because it cannot find its configuration file.
Expected behaviour
Bus daemon starts.
Screenshots
No response
Relevant log output
Additional context
This is due to a nixpkgs downstream patch. The below system metadata is not fully correct as I am actually using Spectrum OS’s pinned nixpkgs and I found the bug on a separate machine.
System metadata
- system:
"x86_64-linux" - host os: `Linux 6.12.41, NixOS, 25.11 (Xantusia), 25.11pre844474.fbcf476f790d
- multi-user?:
yes - sandbox:
yes - version: `nix-env (Lix, like Nix) 2.91.3
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: (long list omitted as they are not relevant and I am having to type this in by hand)
Store directory: /nix/store
State directory: /nix/var/nix:
Data directory: /nix/store/(long hash)-lix-2.91.3/share - channels(root):
"nixos" - nixpkgs:
/nix/var/nix/profiles/per-user/root/channels/nixos
Notify maintainers
@jtojnar
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the nixpkgs dbus package and its downstream patch that controls configuration lookup, then reproduce the issue on Linux with unit files under /usr/share/dbus-1 or /usr/lib. Done when the daemon starts and accepts configuration from /usr/share/dbus-1 without requiring files to be copied into /etc; also check whether dbus-broker is affected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100