Loading nixos/modules/services/system/dbus.nix +12 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,10 @@ in }; systemd.services.dbus = { aliases = [ # hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus-broker.service" ]; # Don't restart dbus-daemon. Bad things tend to happen if we do. reloadIfChanged = true; restartTriggers = [ Loading @@ -158,6 +162,10 @@ in }; systemd.user.services.dbus = { aliases = [ # hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus-broker.service" ]; # Don't restart dbus-daemon. Bad things tend to happen if we do. reloadIfChanged = true; restartTriggers = [ Loading @@ -184,6 +192,8 @@ in # https://github.com/NixOS/nixpkgs/issues/108643 systemd.services.dbus-broker = { aliases = [ # allow other services to just depend on dbus, # but also a hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus.service" ]; unitConfig = { Loading @@ -203,6 +213,8 @@ in systemd.user.services.dbus-broker = { aliases = [ # allow other services to just depend on dbus, # but also a hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus.service" ]; # Don't restart dbus. Bad things tend to happen if we do. Loading nixos/modules/system/activation/switch-to-configuration.pl +3 −0 Original line number Diff line number Diff line Loading @@ -472,6 +472,9 @@ sub handle_modified_unit { ## no critic(Subroutines::ProhibitManyArgs, Subroutin $units_to_reload->{$unit} = 1; record_unit($reload_list_file, $unit); } elsif ($unit eq "dbus.service" || $unit eq "dbus-broker.service") { # dbus service should only ever be reloaded, not started/stoped/restarted as that would break the system. } elsif (!parse_systemd_bool(\%new_unit_info, "Service", "X-RestartIfChanged", 1) || parse_systemd_bool(\%new_unit_info, "Unit", "RefuseManualStop", 0) || parse_systemd_bool(\%new_unit_info, "Unit", "X-OnlyManualStart", 0)) { $units_to_skip->{$unit} = 1; } else { Loading Loading
nixos/modules/services/system/dbus.nix +12 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,10 @@ in }; systemd.services.dbus = { aliases = [ # hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus-broker.service" ]; # Don't restart dbus-daemon. Bad things tend to happen if we do. reloadIfChanged = true; restartTriggers = [ Loading @@ -158,6 +162,10 @@ in }; systemd.user.services.dbus = { aliases = [ # hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus-broker.service" ]; # Don't restart dbus-daemon. Bad things tend to happen if we do. reloadIfChanged = true; restartTriggers = [ Loading @@ -184,6 +192,8 @@ in # https://github.com/NixOS/nixpkgs/issues/108643 systemd.services.dbus-broker = { aliases = [ # allow other services to just depend on dbus, # but also a hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus.service" ]; unitConfig = { Loading @@ -203,6 +213,8 @@ in systemd.user.services.dbus-broker = { aliases = [ # allow other services to just depend on dbus, # but also a hack aiding to prevent dbus from restarting when switching from dbus-broker back to dbus "dbus.service" ]; # Don't restart dbus. Bad things tend to happen if we do. Loading
nixos/modules/system/activation/switch-to-configuration.pl +3 −0 Original line number Diff line number Diff line Loading @@ -472,6 +472,9 @@ sub handle_modified_unit { ## no critic(Subroutines::ProhibitManyArgs, Subroutin $units_to_reload->{$unit} = 1; record_unit($reload_list_file, $unit); } elsif ($unit eq "dbus.service" || $unit eq "dbus-broker.service") { # dbus service should only ever be reloaded, not started/stoped/restarted as that would break the system. } elsif (!parse_systemd_bool(\%new_unit_info, "Service", "X-RestartIfChanged", 1) || parse_systemd_bool(\%new_unit_info, "Unit", "RefuseManualStop", 0) || parse_systemd_bool(\%new_unit_info, "Unit", "X-OnlyManualStart", 0)) { $units_to_skip->{$unit} = 1; } else { Loading