anchor.diff:        security.rtkit.enable = true;
       })
   
  -    (mkIf (cfg.enable && !cfg.systemWide) {
  +    (mkIf nonSystemWide {
         environment.etc = singleton {
           target = "pulse/default.pa";
           source = cfg.configFile;
         };
       })
   
  -    (mkIf (cfg.enable && cfg.systemWide) {
  +    (mkIf 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;
  
positive.code:         description = "PulseAudio System-Wide Server";
          wantedBy = [ "sound.target" ];
          before = [ "sound.target" ];
          path = [ cfg.package ];
          environment.PULSE_RUNTIME_PATH = pulseRuntimePath;
          preStart = ''
            mkdir -p --mode 755 ${pulseRuntimePath}
            chown -R pulse:pulse ${pulseRuntimePath}
          '';
          script = ''
            exec pulseaudio --system -n --file="${cfg.configFile}"
          '';
        };
      })
    ];
  
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.
            '';
          };
        };
      };
  
  