anchor.diff:  
         # Allow PulseAudio to get realtime priority using rtkit.
         security.rtkit.enable = true;
  +
  +    })
  +
  +    (mkIf hasZeroconf {
  +      services.avahi.enable = true;
  +    })
  +    (mkIf cfg.zeroconf.publish.enable {
  +      services.avahi.publish.enable = true;
  +      services.avahi.publish.userServices = true;
       })
   
       (mkIf nonSystemWide {
         environment.etc = singleton {
           target = "pulse/default.pa";
  -        source = cfg.configFile;
  +        source = myConfigFile;
         };
   
         systemd.user = {
  
positive.code:       };
  
        configFile = mkOption {
          type = types.path;
          description = ''
            The path to the configuration the PulseAudio server
            should use. By default, the "default.pa" configuration
            from the PulseAudio distribution is used.
          '';
        };
  
        extraClientConf = mkOption {
          type = types.str;
          default = "";
          description = ''
            Extra configuration appended to pulse/client.conf file.
  
negative.code: 
    systemWide = cfg.enable && cfg.systemWide;
    nonSystemWide = cfg.enable && !cfg.systemWide;
    hasZeroconf = let z = cfg.zeroconf; in z.publish.enable || z.discovery.enable;
  
    overriddenPackage = cfg.package.override
      (optionalAttrs hasZeroconf { zeroconfSupport = true; });
    binary = "${getBin overriddenPackage}/bin/pulseaudio";
    binaryNoDaemon = "${binary} --daemonize=no";
  
    # Forces 32bit pulseaudio and alsaPlugins to be built/supported for apps
    # using 32bit alsa on 64bit linux.
    enable32BitAlsaPlugins = cfg.support32Bit && stdenv.isx86_64 && (pkgs_i686.alsaLib != null && pkgs_i686.libpulseaudio != null);
  
  
    myConfigFile =
      let
        addModuleIf = cond: mod: optionalString cond "load-module ${mod}";
        allAnon = optional cfg.tcp.anonymousClients.allowAll "auth-anonymous=1";
        ipAnon =  let a = cfg.tcp.anonymousClients.allowedIpRanges;
                  in optional (a != []) ''auth-ip-acl=${concatStringsSep ";" a}'';
      in writeTextFile {
        name = "default.pa";
          text = ''
          .include ${cfg.configFile}
          ${addModuleIf cfg.zeroconf.publish.enable "module-zeroconf-publish"}
          ${addModuleIf cfg.zeroconf.discovery.enable "module-zeroconf-discover"}
          ${addModuleIf cfg.tcp.enable (concatStringsSep " "
             ([ "load-module module-native-protocol-tcp" ] ++ allAnon ++ ipAnon))}
          ${cfg.extraConfig}
        '';
      };
  
    ids = config.ids;
  
  