anchor.diff:  # D-Bus configuration and system bus daemon.
   
   { config, lib, pkgs, ... }:
  -
  -with lib;
   
   let
   
  
positive.code: 
      users.groups.messagebus.gid = config.ids.gids.messagebus;
  
      systemd.packages = [ pkgs.dbus.daemon ];
  
      security.wrappers.dbus-daemon-launch-helper = {
        source = "${pkgs.dbus.daemon}/libexec/dbus-daemon-launch-helper";
  
negative.code:     systemd.services.dbus = {
        # Don't restart dbus-daemon. Bad things tend to happen if we do.
        reloadIfChanged = true;
        restartTriggers = [
          configDir
        ];
        environment = {
          LD_LIBRARY_PATH = config.system.nssModules.path;
        };
      };
  
      systemd.user.services.dbus = {
        # Don't restart dbus-daemon. Bad things tend to happen if we do.
        reloadIfChanged = true;
        restartTriggers = [
          configDir
        ];
      };
  
      systemd.user.sockets.dbus.wantedBy = [
        "sockets.target"
      ];
  
      environment.pathsToLink = [
        "/etc/dbus-1"
        "/share/dbus-1"
      ];
    };
  }
  