anchor.diff:  
     cfg = config.hardware.pulseaudio;
   
  +  systemWide = cfg.enable && cfg.systemWide;
  +  nonSystemWide = cfg.enable && !cfg.systemWide;
  +
     uid = config.ids.uids.pulseaudio;
     gid = config.ids.gids.pulseaudio;
   
  -  pulseRuntimePath = "/var/run/pulse";
  +  stateDir = "/run/pulse";
   
     # Create pulse/client.conf even if PulseAudio is disabled so
     # that we can disable the autospawn feature in programs that
     # are built with PulseAudio support (like KDE).
     clientConf = writeText "client.conf" ''
  -    autospawn=${if (cfg.enable && !cfg.systemWide) then "yes" else "no"}
  -    ${optionalString (cfg.enable && !cfg.systemWide)
  -      "daemon-binary=${cfg.package}/bin/pulseaudio"}
  +    autospawn=${if nonSystemWide then "yes" else "no"}
  +    ${optionalString nonSystemWide "daemon-binary=${cfg.package}/bin/pulseaudio"}
     '';
   
     # Write an /etc/asound.conf that causes all ALSA applications to
  
positive.code:       security.rtkit.enable = true;
      })
  
      (mkIf (cfg.enable && !cfg.systemWide) {
        environment.etc = singleton {
          target = "pulse/default.pa";
          source = cfg.configFile;
        };
      })
  
      (mkIf (cfg.enable && cfg.systemWide) {
        users.extraUsers.pulse = {
          # For some reason, PulseAudio wants UID == GID.
          uid = assert uid == gid; uid;
          group = "pulse";
          extraGroups = [ "audio" ];
          description = "PulseAudio system service user";
          home = pulseRuntimePath;
        };
  
        users.extraGroups.pulse.gid = gid;
  
negative.code:           features (such as JACK support) that are not enabled in the
            default PulseAudio in Nixpkgs.
          '';
        };
  
        daemon = {
          logLevel = mkOption {
            type = types.str;
            default = "notice";
            description = ''
              The log level that the system-wide pulseaudio daemon should use,
              if activated.
            '';
          };
        };
      };
  
  