anchor.diff:    config = mkIf cfg.enable {
       environment.systemPackages = [ cfg.package ];
   
  -    environment.etc.asterisk.source = asteriskEtc;
  +    environment.etc = mapAttrs' (name: value:
  +      nameValuePair "asterisk/${name}" value
  +    ) allConfFiles;
   
       users.users.asterisk =
         { name = asteriskUser;
  
positive.code: 
    # Add filecontents from files of useTheseDefaultConfFiles to confFiles, do not override
    defaultConfFiles = subtractLists (attrNames cfg.confFiles) cfg.useTheseDefaultConfFiles;
    allConfFiles =
      cfg.confFiles //
      builtins.listToAttrs (map (x: { name = x;
                                      value = builtins.readFile (cfg.package + "/etc/asterisk/" + x); })
                                defaultConfFiles);
  
    asteriskEtc = pkgs.stdenv.mkDerivation
    ((mapAttrs' (name: value: nameValuePair
          # Fudge the names to make bash happy
          ((replaceChars ["."] ["_"] name) + "_")
          (value)
        ) allConfFiles) //
    {
      confFilesString = concatStringsSep " " (
        attrNames allConfFiles
      );
  
      name = "asterisk-etc";
  
      # Default asterisk.conf file
      # (Notice that astetcdir will be set to the path of this derivation)
      asteriskConf = ''
        [directories]
        astetcdir => /etc/asterisk
        astmoddir => ${cfg.package}/lib/asterisk/modules
  
negative.code:       astrundir => /run/asterisk
        astlogdir => /var/log/asterisk
        astsbindir => ${cfg.package}/sbin
        ${cfg.extraConfig}
      '';
  
      # Loading all modules by default is considered sensible by the authors of
      # "Asterisk: The Definitive Guide". Secure sites will likely want to
      # specify their own "modules.conf" in the confFiles option.
      "modules.conf".text = ''
        [modules]
        autoload=yes
      '';
  
      # Use syslog for logging so logs can be viewed with journalctl
      "logger.conf".text = ''
        [general]
  
        [logfiles]
        syslog.local0 => notice,warning,error
      '';
    } //
      mapAttrs (name: text: { inherit text; }) cfg.confFiles //
      listToAttrs (map (x: nameValuePair x { source = cfg.package + "/etc/asterisk/" + x; }) defaultConfFiles);
  
  in
  
  {
  