diff options
author | r-vdp <ramses@well-founded.dev> | 2023-12-13 19:34:23 +0100 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2023-12-19 10:34:41 +0100 |
commit | c4b3e4f5f89b2d5a96a0280e81eaa880c91b075a (patch) | |
tree | 619b4da44a0841f7331c3af2a9df54701ea886db /nixos/modules/services/system | |
parent | 2f1a96018cb33e8c4c9855e0fd5aa98567bf927e (diff) |
dbus-broker: avoid errors when reloading when /tmp got remounted
When reloading the dbus-broker service (e.g. when switching to a new generation), the reload fails when /tmp got remounted after the service had been started. Since the dbus-broker service starts early, and does not have default dependencies, this situation does occur in practice. This change makes sure that if there are mount units for /tmp, dbus-broker gets ordered after them. See also https://github.com/systemd/systemd/issues/28515
Diffstat (limited to 'nixos/modules/services/system')
-rw-r--r-- | nixos/modules/services/system/dbus.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/services/system/dbus.nix b/nixos/modules/services/system/dbus.nix index 8d5b25e617625..b47ebc92f93a8 100644 --- a/nixos/modules/services/system/dbus.nix +++ b/nixos/modules/services/system/dbus.nix @@ -184,6 +184,11 @@ in aliases = [ "dbus.service" ]; + unitConfig = { + # We get errors when reloading the dbus-broker service + # if /tmp got remounted after this service started + RequiresMountsFor = [ "/tmp" ]; + }; # Don't restart dbus. Bad things tend to happen if we do. reloadIfChanged = true; restartTriggers = [ |