anchor.diff:    run = "${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} postgres";
   
     flags = if cfg.enableTCPIP then ["-i"] else [];
  +
  +  # The main PostgreSQL configuration file.
  +  configFile = pkgs.writeText "postgresql.conf"
  +    ''
  +      hba_file = '${pkgs.writeText "pg_hba.conf" cfg.authentication}'
  +      ident_file = '${pkgs.writeText "pg_ident.conf" cfg.identMap}'
  +      log_destination = 'syslog'
  +    '';  
   
   in
   
  
positive.code:           host  all all ::1/128      md5
          '';
          description = ''
            Hosts (except localhost), who you allow to connect.
          '';
        };
        
        allowedHosts = mkOption {
          default = [];
          description = ''
            Hosts (except localhost), who you allow to connect.
          '';
        };
        
  
negative.code:         '';
        };
        
        authentication = mkOption {
          default = ''
            # Generated file; do not edit!
  