anchor.diff:  
     ###### implementation
     config = mkIf cfg.enable {
  +    assertions = [
  +      {
  +        assertion = cfg.pulse.enable -> !config.hardware.pulseaudio.enable;
  +        message = "PipeWire based PulseAudio emulation doesn't use the PulseAudio service";
  +      }
  +      {
  +        assertion = cfg.jack.enable -> !config.services.jack.jackd.enable;
  +        message = "PIpeWire based JACK emulation doesn't use the JACK service";
  +      }
  +    ];
  +
       environment.systemPackages = [ pkgs.pipewire ]
                                    ++ lib.optional cfg.jack.enable jack-libs
                                    ++ lib.optional cfg.pulse.enable pulse-libs;
   
       systemd.packages = [ pkgs.pipewire ];
   
  +    # PipeWire depends on DBUS but doesn't list it. Without this booting
  +    # into a terminal results in the service crashing with an error.
       systemd.user.sockets.pipewire.wantedBy = lib.mkIf cfg.socketActivation [ "sockets.target" ];
       systemd.user.services.pipewire.bindsTo = [ "dbus.service" ];
       services.udev.packages = [ pkgs.pipewire ];
  
positive.code:     environment.etc."alsa/conf.d/50-pipewire.conf" = mkIf cfg.alsa.enable {
        source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf";
      };
      environment.sessionVariables.LD_LIBRARY_PATH = [ "/run/current-system/sw/lib/pipewire" ];
    };
  }
  
negative.code:       };
  
        alsa = {
          enable = mkEnableOption "ALSA support";
          support32Bit = mkEnableOption "32-bit ALSA support on 64-bit systems";
        };
  
        jack = {
          enable = mkEnableOption "JACK audio emulation";
        };
  
        pulse = {
          enable = mkEnableOption "PulseAudio emulation";
        };
      };
    };
  