---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (7, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (7, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "services",
         position: (7, 16),
        },
        Raw {
         content: "postgresql",
         position: (7, 25),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "postgresql",
        position: (9, 3),
       },
      ],
     },
     to: IfThenElse {
      predicate: BinaryOperation {
       operator: EqualTo,
       operands: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (10, 8),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "extraPlugins",
            position: (10, 12),
           },
          ],
         },
         default: None,
        },
        List {
         elements: [],
         position: (10, 28),
        },
       ],
       position: (10, 25),
      },
      then: PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (11, 12),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "package",
          position: (11, 16),
         },
        ],
       },
       default: None,
      },
      else_: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (12, 12),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "package",
           position: (12, 16),
          },
          Raw {
           content: "withPackages",
           position: (12, 24),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Parentheses {
         expression: Function {
          argument: Simple {
           identifier: "_",
          },
          definition: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (12, 41),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "extraPlugins",
              position: (12, 45),
             },
            ],
           },
           default: None,
          },
          position: (12, 38),
         },
         position: (12, 37),
        },
       ],
      },
      position: (10, 5),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "toStr",
        position: (14, 3),
       },
      ],
     },
     to: Function {
      argument: Simple {
       identifier: "value",
      },
      definition: IfThenElse {
       predicate: BinaryOperation {
        operator: EqualTo,
        operands: [
         Variable {
          identifier: "true",
          position: (15, 8),
         },
         Variable {
          identifier: "value",
          position: (15, 16),
         },
        ],
        position: (15, 13),
       },
       then: String {
        parts: [
         Raw {
          content: "yes",
          position: (15, 28),
         },
        ],
        position: (15, 27),
       },
       else_: IfThenElse {
        predicate: BinaryOperation {
         operator: EqualTo,
         operands: [
          Variable {
           identifier: "false",
           position: (16, 13),
          },
          Variable {
           identifier: "value",
           position: (16, 22),
          },
         ],
         position: (16, 19),
        },
        then: String {
         parts: [
          Raw {
           content: "no",
           position: (16, 34),
          },
         ],
         position: (16, 33),
        },
        else_: IfThenElse {
         predicate: FunctionApplication {
          function: Variable {
           identifier: "isString",
           position: (17, 13),
          },
          arguments: [
           Variable {
            identifier: "value",
            position: (17, 22),
           },
          ],
         },
         then: String {
          parts: [
           Raw {
            content: "'",
            position: (17, 34),
           },
           Interpolation {
            expression: FunctionApplication {
             function: PropertyAccess {
              expression: Variable {
               identifier: "lib",
               position: (17, 37),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "replaceStrings",
                 position: (17, 41),
                },
               ],
              },
              default: None,
             },
             arguments: [
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "'",
                   position: (17, 58),
                  },
                 ],
                 position: (17, 57),
                },
               ],
               position: (17, 56),
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "''",
                   position: (17, 64),
                  },
                 ],
                 position: (17, 63),
                },
               ],
               position: (17, 62),
              },
              Variable {
               identifier: "value",
               position: (17, 69),
              },
             ],
            },
           },
           Raw {
            content: "'",
            position: (17, 75),
           },
          ],
          position: (17, 33),
         },
         else_: FunctionApplication {
          function: Variable {
           identifier: "toString",
           position: (18, 10),
          },
          arguments: [
           Variable {
            identifier: "value",
            position: (18, 19),
           },
          ],
         },
         position: (17, 10),
        },
        position: (16, 10),
       },
       position: (15, 5),
      },
      position: (14, 11),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "configFile",
        position: (21, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (21, 16),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "writeTextDir",
          position: (21, 21),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "postgresql.conf",
          position: (21, 35),
         },
        ],
        position: (21, 34),
       },
       Parentheses {
        expression: FunctionApplication {
         function: Variable {
          identifier: "concatStringsSep",
          position: (21, 53),
         },
         arguments: [
          String {
           parts: [
            Raw {
             content: "\n",
             position: (21, 71),
            },
           ],
           position: (21, 70),
          },
          Parentheses {
           expression: FunctionApplication {
            function: Variable {
             identifier: "mapAttrsToList",
             position: (21, 76),
            },
            arguments: [
             Parentheses {
              expression: Function {
               argument: Simple {
                identifier: "n",
               },
               definition: Function {
                argument: Simple {
                 identifier: "v",
                },
                definition: String {
                 parts: [
                  Interpolation {
                   expression: Variable {
                    identifier: "n",
                    position: (21, 101),
                   },
                  },
                  Raw {
                   content: " = ",
                   position: (21, 103),
                  },
                  Interpolation {
                   expression: FunctionApplication {
                    function: Variable {
                     identifier: "toStr",
                     position: (21, 108),
                    },
                    arguments: [
                     Variable {
                      identifier: "v",
                      position: (21, 114),
                     },
                    ],
                   },
                  },
                 ],
                 position: (21, 98),
                },
                position: (21, 95),
               },
               position: (21, 92),
              },
              position: (21, 91),
             },
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (21, 119),
              },
              attribute_path: AttributePath {
               parts: [
                Raw {
                 content: "settings",
                 position: (21, 123),
                },
               ],
              },
              default: None,
             },
            ],
           },
           position: (21, 75),
          },
         ],
        },
        position: (21, 52),
       },
      ],
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "configFileCheck",
        position: (23, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (23, 21),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "runCommand",
          position: (23, 26),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "postgresql-configfile-check",
          position: (23, 38),
         },
        ],
        position: (23, 37),
       },
       Map {
        bindings: [],
        recursive: false,
        position: (23, 67),
       },
       String {
        parts: [
         Raw {
          content: "",
          position: (24, 1),
         },
         Interpolation {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (24, 7),
           },
           attribute_path: AttributePath {
            parts: [
             Raw {
              content: "package",
              position: (24, 11),
             },
            ],
           },
           default: None,
          },
         },
         Raw {
          content: "/bin/postgres -D",
          position: (24, 19),
         },
         Interpolation {
          expression: Variable {
           identifier: "configFile",
           position: (24, 37),
          },
         },
         Raw {
          content: " -C config_file >/dev/null\ntouch $out\n",
          position: (24, 48),
         },
        ],
        position: (23, 70),
       },
      ],
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "groupAccessAvailable",
        position: (28, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: Variable {
       identifier: "versionAtLeast",
       position: (28, 26),
      },
      arguments: [
       PropertyAccess {
        expression: Variable {
         identifier: "postgresql",
         position: (28, 41),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "version",
           position: (28, 52),
          },
         ],
        },
        default: None,
       },
       String {
        parts: [
         Raw {
          content: "11.0",
          position: (28, 61),
         },
        ],
        position: (28, 60),
       },
      ],
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "imports",
         position: (33, 3),
        },
       ],
      },
      to: List {
       elements: [
        Parentheses {
         expression: FunctionApplication {
          function: Variable {
           identifier: "mkRemovedOptionModule",
           position: (34, 6),
          },
          arguments: [
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "services",
                position: (34, 31),
               },
              ],
              position: (34, 30),
             },
             String {
              parts: [
               Raw {
                content: "postgresql",
                position: (34, 42),
               },
              ],
              position: (34, 41),
             },
             String {
              parts: [
               Raw {
                content: "extraConfig",
                position: (34, 55),
               },
              ],
              position: (34, 54),
             },
            ],
            position: (34, 28),
           },
           String {
            parts: [
             Raw {
              content: "Use services.postgresql.settings instead.",
              position: (34, 71),
             },
            ],
            position: (34, 70),
           },
          ],
         },
         position: (34, 5),
        },
       ],
       position: (33, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (39, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "services",
            position: (41, 5),
           },
           Raw {
            content: "postgresql",
            position: (41, 14),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "enable",
               position: (43, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (43, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "PostgreSQL Server",
                 position: (43, 32),
                },
               ],
               position: (43, 31),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "package",
               position: (45, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (45, 17),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (46, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (46, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "package",
                     position: (46, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (47, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (47, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.postgresql_11",
                      position: (47, 38),
                     },
                    ],
                    position: (47, 37),
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (48, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "PostgreSQL package to use.\n",
                    position: (49, 1),
                   },
                  ],
                  position: (48, 23),
                 },
                },
               ],
               recursive: false,
               position: (45, 26),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "port",
               position: (53, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (53, 14),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (54, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (54, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "int",
                     position: (54, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (55, 9),
                   },
                  ],
                 },
                 to: Int {
                  value: 5432,
                  position: (55, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (56, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "The port on which PostgreSQL listens.\n",
                    position: (57, 1),
                   },
                  ],
                  position: (56, 23),
                 },
                },
               ],
               recursive: false,
               position: (53, 23),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "checkConfig",
               position: (61, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (61, 21),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (62, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (62, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "bool",
                     position: (62, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (63, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "true",
                  position: (63, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (64, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Check the syntax of the configuration file at compile time",
                    position: (64, 24),
                   },
                  ],
                  position: (64, 23),
                 },
                },
               ],
               recursive: false,
               position: (61, 30),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "dataDir",
               position: (67, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (67, 17),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (68, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (68, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "path",
                     position: (68, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "defaultText",
                    position: (69, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (69, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "\"/var/lib/postgresql/",
                      position: (69, 43),
                     },
                     Raw {
                      content: "$",
                      position: (69, 64),
                     },
                     Raw {
                      content: "{config.services.postgresql.package.psqlSchema}\"",
                      position: (69, 67),
                     },
                    ],
                    position: (69, 41),
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (70, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "/var/lib/postgresql/11",
                    position: (70, 20),
                   },
                  ],
                  position: (70, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (71, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "The data directory for PostgreSQL. If left as the default value\nthis directory will automatically be created before the PostgreSQL server starts, otherwise\nthe sysadmin is responsible for ensuring the directory exists with appropriate ownership\nand permissions.\n",
                    position: (72, 1),
                   },
                  ],
                  position: (71, 23),
                 },
                },
               ],
               recursive: false,
               position: (67, 26),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "authentication",
               position: (79, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (79, 24),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (80, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (80, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "lines",
                     position: (80, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (81, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [],
                  position: (81, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (82, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Defines how users authenticate themselves to the server. See the\n<link xlink:href=\"https://www.postgresql.org/docs/current/auth-pg-hba-conf.html\">\nPostgreSQL documentation for pg_hba.conf</link>\nfor details on the expected format of this option. By default,\npeer based authentication will be used for users connecting\nvia the Unix socket, and md5 password authentication will be\nused for users connecting via TCP. Any added rules will be\ninserted above the default rules. If you'd like to replace the\ndefault rules entirely, you can use <function>lib.mkForce</function> in your\nmodule.\n",
                    position: (83, 1),
                   },
                  ],
                  position: (82, 23),
                 },
                },
               ],
               recursive: false,
               position: (79, 33),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "identMap",
               position: (96, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (96, 18),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (97, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (97, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "lines",
                     position: (97, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (98, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [],
                  position: (98, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (99, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Defines the mapping from system users to database users.\n\nThe general form is:\n\nmap-name system-username database-username\n",
                    position: (100, 1),
                   },
                  ],
                  position: (99, 23),
                 },
                },
               ],
               recursive: false,
               position: (96, 27),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "initdbArgs",
               position: (108, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (108, 20),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (109, 9),
                   },
                  ],
                 },
                 to: With {
                  expression: Variable {
                   identifier: "types",
                   position: (109, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "listOf",
                    position: (109, 28),
                   },
                   arguments: [
                    Variable {
                     identifier: "str",
                     position: (109, 35),
                    },
                   ],
                  },
                  position: (109, 16),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (110, 9),
                   },
                  ],
                 },
                 to: List {
                  elements: [],
                  position: (110, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (111, 9),
                   },
                  ],
                 },
                 to: List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "--data-checksums",
                      position: (111, 22),
                     },
                    ],
                    position: (111, 21),
                   },
                   String {
                    parts: [
                     Raw {
                      content: "--allow-group-access",
                      position: (111, 41),
                     },
                    ],
                    position: (111, 40),
                   },
                  ],
                  position: (111, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (112, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Additional arguments passed to <literal>initdb</literal> during data dir\ninitialisation.\n",
                    position: (113, 1),
                   },
                  ],
                  position: (112, 23),
                 },
                },
               ],
               recursive: false,
               position: (108, 29),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "initialScript",
               position: (118, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (118, 23),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (119, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (119, 16),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "nullOr",
                      position: (119, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (119, 29),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "path",
                       position: (119, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (120, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "null",
                  position: (120, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (121, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "A file containing SQL statements to execute on first startup.\n",
                    position: (122, 1),
                   },
                  ],
                  position: (121, 23),
                 },
                },
               ],
               recursive: false,
               position: (118, 32),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ensureDatabases",
               position: (126, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (126, 25),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (127, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (127, 16),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "listOf",
                      position: (127, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (127, 29),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "str",
                       position: (127, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (128, 9),
                   },
                  ],
                 },
                 to: List {
                  elements: [],
                  position: (128, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (129, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Ensures that the specified databases exist.\nThis option will never delete existing databases, especially not when the value of this\noption is changed. This means that databases created once through this option or\notherwise have to be removed manually.\n",
                    position: (130, 1),
                   },
                  ],
                  position: (129, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (135, 9),
                   },
                  ],
                 },
                 to: List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "gitea",
                      position: (136, 12),
                     },
                    ],
                    position: (136, 11),
                   },
                   String {
                    parts: [
                     Raw {
                      content: "nextcloud",
                      position: (137, 12),
                     },
                    ],
                    position: (137, 11),
                   },
                  ],
                  position: (135, 19),
                 },
                },
               ],
               recursive: false,
               position: (126, 34),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "ensureUsers",
               position: (141, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (141, 21),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (142, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (142, 16),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "listOf",
                      position: (142, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   Parentheses {
                    expression: FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "types",
                       position: (142, 30),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "submodule",
                         position: (142, 36),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      Map {
                       bindings: [
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "options",
                            position: (143, 11),
                           },
                          ],
                         },
                         to: Map {
                          bindings: [
                           Binding {
                            from: AttributePath {
                             parts: [
                              Raw {
                               content: "name",
                               position: (144, 13),
                              },
                             ],
                            },
                            to: FunctionApplication {
                             function: Variable {
                              identifier: "mkOption",
                              position: (144, 20),
                             },
                             arguments: [
                              Map {
                               bindings: [
                                Binding {
                                 from: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "type",
                                    position: (145, 15),
                                   },
                                  ],
                                 },
                                 to: PropertyAccess {
                                  expression: Variable {
                                   identifier: "types",
                                   position: (145, 22),
                                  },
                                  attribute_path: AttributePath {
                                   parts: [
                                    Raw {
                                     content: "str",
                                     position: (145, 28),
                                    },
                                   ],
                                  },
                                  default: None,
                                 },
                                },
                                Binding {
                                 from: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "description",
                                    position: (146, 15),
                                   },
                                  ],
                                 },
                                 to: String {
                                  parts: [
                                   Raw {
                                    content: "Name of the user to ensure.\n",
                                    position: (147, 1),
                                   },
                                  ],
                                  position: (146, 29),
                                 },
                                },
                               ],
                               recursive: false,
                               position: (144, 29),
                              },
                             ],
                            },
                           },
                           Binding {
                            from: AttributePath {
                             parts: [
                              Raw {
                               content: "ensurePermissions",
                               position: (150, 13),
                              },
                             ],
                            },
                            to: FunctionApplication {
                             function: Variable {
                              identifier: "mkOption",
                              position: (150, 33),
                             },
                             arguments: [
                              Map {
                               bindings: [
                                Binding {
                                 from: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "type",
                                    position: (151, 15),
                                   },
                                  ],
                                 },
                                 to: FunctionApplication {
                                  function: PropertyAccess {
                                   expression: Variable {
                                    identifier: "types",
                                    position: (151, 22),
                                   },
                                   attribute_path: AttributePath {
                                    parts: [
                                     Raw {
                                      content: "attrsOf",
                                      position: (151, 28),
                                     },
                                    ],
                                   },
                                   default: None,
                                  },
                                  arguments: [
                                   PropertyAccess {
                                    expression: Variable {
                                     identifier: "types",
                                     position: (151, 36),
                                    },
                                    attribute_path: AttributePath {
                                     parts: [
                                      Raw {
                                       content: "str",
                                       position: (151, 42),
                                      },
                                     ],
                                    },
                                    default: None,
                                   },
                                  ],
                                 },
                                },
                                Binding {
                                 from: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "default",
                                    position: (152, 15),
                                   },
                                  ],
                                 },
                                 to: Map {
                                  bindings: [],
                                  recursive: false,
                                  position: (152, 25),
                                 },
                                },
                                Binding {
                                 from: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "description",
                                    position: (153, 15),
                                   },
                                  ],
                                 },
                                 to: String {
                                  parts: [
                                   Raw {
                                    content: "Permissions to ensure for the user, specified as an attribute set.\nThe attribute names specify the database and tables to grant the permissions for.\nThe attribute values specify the permissions to grant. You may specify one or\nmultiple comma-separated SQL privileges here.\n\nFor more information on how to specify the target\nand on which privileges exist, see the\n<link xlink:href=\"https://www.postgresql.org/docs/current/sql-grant.html\">GRANT syntax</link>.\nThe attributes are used as <code>GRANT ",
                                    position: (154, 1),
                                   },
                                   Raw {
                                    content: "$",
                                    position: (162, 56),
                                   },
                                   Raw {
                                    content: "{attrValue} ON ",
                                    position: (162, 59),
                                   },
                                   Raw {
                                    content: "$",
                                    position: (162, 74),
                                   },
                                   Raw {
                                    content: "{attrName}</code>.\n",
                                    position: (162, 77),
                                   },
                                  ],
                                  position: (153, 29),
                                 },
                                },
                                Binding {
                                 from: AttributePath {
                                  parts: [
                                   Raw {
                                    content: "example",
                                    position: (164, 15),
                                   },
                                  ],
                                 },
                                 to: FunctionApplication {
                                  function: Variable {
                                   identifier: "literalExpression",
                                   position: (164, 25),
                                  },
                                  arguments: [
                                   String {
                                    parts: [
                                     Raw {
                                      content: "{\n  \"DATABASE \\\"nextcloud\\\"\" = \"ALL PRIVILEGES\";\n  \"ALL TABLES IN SCHEMA public\" = \"ALL PRIVILEGES\";\n}\n",
                                      position: (165, 1),
                                     },
                                    ],
                                    position: (164, 43),
                                   },
                                  ],
                                 },
                                },
                               ],
                               recursive: false,
                               position: (150, 42),
                              },
                             ],
                            },
                           },
                          ],
                          recursive: false,
                          position: (143, 21),
                         },
                        },
                       ],
                       recursive: false,
                       position: (142, 46),
                      },
                     ],
                    },
                    position: (142, 29),
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (173, 9),
                   },
                  ],
                 },
                 to: List {
                  elements: [],
                  position: (173, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (174, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Ensures that the specified users exist and have at least the ensured permissions.\nThe PostgreSQL users will be identified using peer authentication. This authenticates the Unix user with the\nsame name only, and that without the need for a password.\nThis option will never delete existing users or remove permissions, especially not when the value of this\noption is changed. This means that users created and permissions assigned once through this option or\notherwise have to be removed manually.\n",
                    position: (175, 1),
                   },
                  ],
                  position: (174, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (182, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (182, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "[\n  {\n    name = \"nextcloud\";\n    ensurePermissions = {\n      \"DATABASE nextcloud\" = \"ALL PRIVILEGES\";\n    };\n  }\n  {\n    name = \"superuser\";\n    ensurePermissions = {\n      \"ALL TABLES IN SCHEMA public\" = \"ALL PRIVILEGES\";\n    };\n  }\n]\n",
                      position: (183, 1),
                     },
                    ],
                    position: (182, 37),
                   },
                  ],
                 },
                },
               ],
               recursive: false,
               position: (141, 30),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "enableTCPIP",
               position: (200, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (200, 21),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (201, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (201, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "bool",
                     position: (201, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (202, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "false",
                  position: (202, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (203, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Whether PostgreSQL should listen on all network interfaces.\nIf disabled, the database can only be accessed via its Unix\ndomain socket or via TCP connections to localhost.\n",
                    position: (204, 1),
                   },
                  ],
                  position: (203, 23),
                 },
                },
               ],
               recursive: false,
               position: (200, 30),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "logLinePrefix",
               position: (210, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (210, 23),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (211, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (211, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "str",
                     position: (211, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (212, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "[%p] ",
                    position: (212, 20),
                   },
                  ],
                  position: (212, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (213, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "%m [%p] ",
                    position: (213, 20),
                   },
                  ],
                  position: (213, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (214, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "A printf-style string that is output at the beginning of each log line.\nUpstream default is <literal>'%m [%p] '</literal>, i.e. it includes the timestamp. We do\nnot include the timestamp, because journal has it anyway.\n",
                    position: (215, 1),
                   },
                  ],
                  position: (214, 23),
                 },
                },
               ],
               recursive: false,
               position: (210, 32),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "extraPlugins",
               position: (221, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (221, 22),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (222, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (222, 16),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "listOf",
                      position: (222, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (222, 29),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "path",
                       position: (222, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (223, 9),
                   },
                  ],
                 },
                 to: List {
                  elements: [],
                  position: (223, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (224, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (224, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "with pkgs.postgresql_11.pkgs; [ postgis pg_repack ]",
                      position: (224, 38),
                     },
                    ],
                    position: (224, 37),
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (225, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "List of PostgreSQL plugins. PostgreSQL version for each plugin should\nmatch version for <literal>services.postgresql.package</literal> value.\n",
                    position: (226, 1),
                   },
                  ],
                  position: (225, 23),
                 },
                },
               ],
               recursive: false,
               position: (221, 31),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "settings",
               position: (231, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (231, 18),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (232, 9),
                   },
                  ],
                 },
                 to: With {
                  expression: Variable {
                   identifier: "types",
                   position: (232, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "attrsOf",
                    position: (232, 28),
                   },
                   arguments: [
                    Parentheses {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "oneOf",
                       position: (232, 37),
                      },
                      arguments: [
                       List {
                        elements: [
                         Variable {
                          identifier: "bool",
                          position: (232, 45),
                         },
                         Variable {
                          identifier: "float",
                          position: (232, 50),
                         },
                         Variable {
                          identifier: "int",
                          position: (232, 56),
                         },
                         Variable {
                          identifier: "str",
                          position: (232, 60),
                         },
                        ],
                        position: (232, 43),
                       },
                      ],
                     },
                     position: (232, 36),
                    },
                   ],
                  },
                  position: (232, 16),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (233, 9),
                   },
                  ],
                 },
                 to: Map {
                  bindings: [],
                  recursive: false,
                  position: (233, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (234, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "PostgreSQL configuration. Refer to\n<link xlink:href=\"https://www.postgresql.org/docs/11/config-setting.html#CONFIG-SETTING-CONFIGURATION-FILE\"/>\nfor an overview of <literal>postgresql.conf</literal>.\n\n<note><para>\n  String values will automatically be enclosed in single quotes. Single quotes will be\n  escaped with two single quotes as described by the upstream documentation linked above.\n</para></note>\n",
                    position: (235, 1),
                   },
                  ],
                  position: (234, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (244, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (244, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "{\n  log_connections = true;\n  log_statement = \"all\";\n  logging_collector = true\n  log_disconnections = true\n  log_destination = lib.mkForce \"syslog\";\n}\n",
                      position: (245, 1),
                     },
                    ],
                    position: (244, 37),
                   },
                  ],
                 },
                },
               ],
               recursive: false,
               position: (231, 27),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "recoveryConfig",
               position: (255, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (255, 24),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (256, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (256, 16),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "nullOr",
                      position: (256, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (256, 29),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "lines",
                       position: (256, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (257, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "null",
                  position: (257, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (258, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Contents of the <filename>recovery.conf</filename> file.\n",
                    position: (259, 1),
                   },
                  ],
                  position: (258, 23),
                 },
                },
               ],
               recursive: false,
               position: (255, 33),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "superUser",
               position: (263, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (263, 19),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (264, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (264, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "str",
                     position: (264, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (265, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "postgres",
                    position: (265, 20),
                   },
                  ],
                  position: (265, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "internal",
                    position: (266, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "true",
                  position: (266, 20),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "readOnly",
                    position: (267, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "true",
                  position: (267, 20),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (268, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "PostgreSQL superuser account to use for various operations. Internal since changing\nthis value would lead to breakage while setting up databases.\n",
                    position: (269, 1),
                   },
                  ],
                  position: (268, 23),
                 },
                },
               ],
               recursive: false,
               position: (263, 28),
              },
             ],
            },
           },
          ],
          recursive: false,
          position: (41, 27),
         },
        },
       ],
       recursive: false,
       position: (39, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (280, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (280, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (280, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (280, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "services",
              position: (282, 5),
             },
             Raw {
              content: "postgresql",
              position: (282, 14),
             },
             Raw {
              content: "settings",
              position: (282, 25),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "hba_file",
                 position: (284, 9),
                },
               ],
              },
              to: String {
               parts: [
                Interpolation {
                 expression: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (284, 23),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "writeText",
                      position: (284, 28),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pg_hba.conf",
                      position: (284, 39),
                     },
                    ],
                    position: (284, 38),
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (284, 52),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "authentication",
                       position: (284, 56),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
               ],
               position: (284, 20),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "ident_file",
                 position: (285, 9),
                },
               ],
              },
              to: String {
               parts: [
                Interpolation {
                 expression: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (285, 25),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "writeText",
                      position: (285, 30),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pg_ident.conf",
                      position: (285, 41),
                     },
                    ],
                    position: (285, 40),
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (285, 56),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "identMap",
                       position: (285, 60),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
               ],
               position: (285, 22),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "log_destination",
                 position: (286, 9),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "stderr",
                 position: (286, 28),
                },
               ],
               position: (286, 27),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "log_line_prefix",
                 position: (287, 9),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (287, 27),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "logLinePrefix",
                  position: (287, 31),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "listen_addresses",
                 position: (288, 9),
                },
               ],
              },
              to: IfThenElse {
               predicate: PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (288, 31),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "enableTCPIP",
                   position: (288, 35),
                  },
                 ],
                },
                default: None,
               },
               then: String {
                parts: [
                 Raw {
                  content: "*",
                  position: (288, 53),
                 },
                ],
                position: (288, 52),
               },
               else_: String {
                parts: [
                 Raw {
                  content: "localhost",
                  position: (288, 62),
                 },
                ],
                position: (288, 61),
               },
               position: (288, 28),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "port",
                 position: (289, 9),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (289, 16),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "port",
                  position: (289, 20),
                 },
                ],
               },
               default: None,
              },
             },
            ],
            recursive: false,
            position: (283, 7),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "services",
              position: (292, 5),
             },
             Raw {
              content: "postgresql",
              position: (292, 14),
             },
             Raw {
              content: "package",
              position: (292, 25),
             },
            ],
           },
           to: LetIn {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "mkThrow",
                 position: (293, 9),
                },
               ],
              },
              to: Function {
               argument: Simple {
                identifier: "ver",
               },
               definition: FunctionApplication {
                function: Variable {
                 identifier: "throw",
                 position: (293, 24),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: "postgresql_",
                    position: (293, 31),
                   },
                   Interpolation {
                    expression: Variable {
                     identifier: "ver",
                     position: (293, 44),
                    },
                   },
                   Raw {
                    content: " was removed, please upgrade your postgresql version.",
                    position: (293, 48),
                   },
                  ],
                  position: (293, 30),
                 },
                ],
               },
               position: (293, 19),
              },
             },
            ],
            target: FunctionApplication {
             function: Variable {
              identifier: "mkDefault",
              position: (298, 7),
             },
             arguments: [
              Parentheses {
               expression: IfThenElse {
                predicate: FunctionApplication {
                 function: Variable {
                  identifier: "versionAtLeast",
                  position: (298, 21),
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "config",
                    position: (298, 36),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "system",
                      position: (298, 43),
                     },
                     Raw {
                      content: "stateVersion",
                      position: (298, 50),
                     },
                    ],
                   },
                   default: None,
                  },
                  String {
                   parts: [
                    Raw {
                     content: "21.11",
                     position: (298, 64),
                    },
                   ],
                   position: (298, 63),
                  },
                 ],
                },
                then: PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (298, 76),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "postgresql_13",
                    position: (298, 81),
                   },
                  ],
                 },
                 default: None,
                },
                else_: IfThenElse {
                 predicate: FunctionApplication {
                  function: Variable {
                   identifier: "versionAtLeast",
                   position: (299, 21),
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "config",
                     position: (299, 36),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "system",
                       position: (299, 43),
                      },
                      Raw {
                       content: "stateVersion",
                       position: (299, 50),
                      },
                     ],
                    },
                    default: None,
                   },
                   String {
                    parts: [
                     Raw {
                      content: "20.03",
                      position: (299, 64),
                     },
                    ],
                    position: (299, 63),
                   },
                  ],
                 },
                 then: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (299, 76),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "postgresql_11",
                     position: (299, 81),
                    },
                   ],
                  },
                  default: None,
                 },
                 else_: IfThenElse {
                  predicate: FunctionApplication {
                   function: Variable {
                    identifier: "versionAtLeast",
                    position: (300, 21),
                   },
                   arguments: [
                    PropertyAccess {
                     expression: Variable {
                      identifier: "config",
                      position: (300, 36),
                     },
                     attribute_path: AttributePath {
                      parts: [
                       Raw {
                        content: "system",
                        position: (300, 43),
                       },
                       Raw {
                        content: "stateVersion",
                        position: (300, 50),
                       },
                      ],
                     },
                     default: None,
                    },
                    String {
                     parts: [
                      Raw {
                       content: "17.09",
                       position: (300, 64),
                      },
                     ],
                     position: (300, 63),
                    },
                   ],
                  },
                  then: FunctionApplication {
                   function: Variable {
                    identifier: "mkThrow",
                    position: (300, 76),
                   },
                   arguments: [
                    String {
                     parts: [
                      Raw {
                       content: "9_6",
                       position: (300, 85),
                      },
                     ],
                     position: (300, 84),
                    },
                   ],
                  },
                  else_: FunctionApplication {
                   function: Variable {
                    identifier: "mkThrow",
                    position: (301, 18),
                   },
                   arguments: [
                    String {
                     parts: [
                      Raw {
                       content: "9_5",
                       position: (301, 27),
                      },
                     ],
                     position: (301, 26),
                    },
                   ],
                  },
                  position: (300, 18),
                 },
                 position: (299, 18),
                },
                position: (298, 18),
               },
               position: (298, 17),
              },
             ],
            },
            position: (292, 35),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "services",
              position: (303, 5),
             },
             Raw {
              content: "postgresql",
              position: (303, 14),
             },
             Raw {
              content: "dataDir",
              position: (303, 25),
             },
            ],
           },
           to: FunctionApplication {
            function: Variable {
             identifier: "mkDefault",
             position: (303, 35),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: "/var/lib/postgresql/",
                position: (303, 46),
               },
               Interpolation {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (303, 68),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "package",
                    position: (303, 72),
                   },
                   Raw {
                    content: "psqlSchema",
                    position: (303, 80),
                   },
                  ],
                 },
                 default: None,
                },
               },
              ],
              position: (303, 45),
             },
            ],
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "services",
              position: (305, 5),
             },
             Raw {
              content: "postgresql",
              position: (305, 14),
             },
             Raw {
              content: "authentication",
              position: (305, 25),
             },
            ],
           },
           to: FunctionApplication {
            function: Variable {
             identifier: "mkAfter",
             position: (305, 42),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: "# Generated file; do not edit!\nlocal all all              peer\nhost  all all 127.0.0.1/32 md5\nhost  all all ::1/128      md5\n",
                position: (307, 1),
               },
              ],
              position: (306, 7),
             },
            ],
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "users",
              position: (313, 5),
             },
             Raw {
              content: "users",
              position: (313, 11),
             },
             Raw {
              content: "postgres",
              position: (313, 17),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "name",
                 position: (314, 9),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "postgres",
                 position: (314, 17),
                },
               ],
               position: (314, 16),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "uid",
                 position: (315, 9),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (315, 15),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "ids",
                  position: (315, 22),
                 },
                 Raw {
                  content: "uids",
                  position: (315, 26),
                 },
                 Raw {
                  content: "postgres",
                  position: (315, 31),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "group",
                 position: (316, 9),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "postgres",
                 position: (316, 18),
                },
               ],
               position: (316, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (317, 9),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "PostgreSQL server user",
                 position: (317, 24),
                },
               ],
               position: (317, 23),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "home",
                 position: (318, 9),
                },
               ],
              },
              to: String {
               parts: [
                Interpolation {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (318, 19),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "dataDir",
                     position: (318, 23),
                    },
                   ],
                  },
                  default: None,
                 },
                },
               ],
               position: (318, 16),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "useDefaultShell",
                 position: (319, 9),
                },
               ],
              },
              to: Variable {
               identifier: "true",
               position: (319, 27),
              },
             },
            ],
            recursive: false,
            position: (314, 7),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "users",
              position: (322, 5),
             },
             Raw {
              content: "groups",
              position: (322, 11),
             },
             Raw {
              content: "postgres",
              position: (322, 18),
             },
             Raw {
              content: "gid",
              position: (322, 27),
             },
            ],
           },
           to: PropertyAccess {
            expression: Variable {
             identifier: "config",
             position: (322, 33),
            },
            attribute_path: AttributePath {
             parts: [
              Raw {
               content: "ids",
               position: (322, 40),
              },
              Raw {
               content: "gids",
               position: (322, 44),
              },
              Raw {
               content: "postgres",
               position: (322, 49),
              },
             ],
            },
            default: None,
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "environment",
              position: (324, 5),
             },
             Raw {
              content: "systemPackages",
              position: (324, 17),
             },
            ],
           },
           to: List {
            elements: [
             Variable {
              identifier: "postgresql",
              position: (324, 36),
             },
            ],
            position: (324, 34),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "environment",
              position: (326, 5),
             },
             Raw {
              content: "pathsToLink",
              position: (326, 17),
             },
            ],
           },
           to: List {
            elements: [
             String {
              parts: [
               Raw {
                content: "/share/postgresql",
                position: (327, 7),
               },
              ],
              position: (327, 6),
             },
            ],
            position: (326, 31),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "system",
              position: (330, 5),
             },
             Raw {
              content: "extraDependencies",
              position: (330, 12),
             },
            ],
           },
           to: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "lib",
              position: (330, 32),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "optional",
                position: (330, 36),
               },
              ],
             },
             default: None,
            },
            arguments: [
             Parentheses {
              expression: BinaryOperation {
               operator: LogicalAnd,
               operands: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (330, 46),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "checkConfig",
                    position: (330, 50),
                   },
                  ],
                 },
                 default: None,
                },
                BinaryOperation {
                 operator: EqualTo,
                 operands: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (330, 65),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "stdenv",
                      position: (330, 70),
                     },
                     Raw {
                      content: "hostPlatform",
                      position: (330, 77),
                     },
                    ],
                   },
                   default: None,
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (330, 93),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "stdenv",
                      position: (330, 98),
                     },
                     Raw {
                      content: "buildPlatform",
                      position: (330, 105),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                 position: (330, 90),
                },
               ],
               position: (330, 62),
              },
              position: (330, 45),
             },
             Variable {
              identifier: "configFileCheck",
              position: (330, 120),
             },
            ],
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (332, 5),
             },
             Raw {
              content: "services",
              position: (332, 13),
             },
             Raw {
              content: "postgresql",
              position: (332, 22),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (333, 9),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "PostgreSQL Server",
                 position: (333, 24),
                },
               ],
               position: (333, 23),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "wantedBy",
                 position: (335, 9),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (335, 23),
                  },
                 ],
                 position: (335, 22),
                },
               ],
               position: (335, 20),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "after",
                 position: (336, 9),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (336, 20),
                  },
                 ],
                 position: (336, 19),
                },
               ],
               position: (336, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "environment",
                 position: (338, 9),
                },
                Raw {
                 content: "PGDATA",
                 position: (338, 21),
                },
               ],
              },
              to: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (338, 30),
               },
               attribute_path: AttributePath {
                parts: [
                 Raw {
                  content: "dataDir",
                  position: (338, 34),
                 },
                ],
               },
               default: None,
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "path",
                 position: (340, 9),
                },
               ],
              },
              to: List {
               elements: [
                Variable {
                 identifier: "postgresql",
                 position: (340, 18),
                },
               ],
               position: (340, 16),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "preStart",
                 position: (342, 9),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "if ! test -e ",
                 position: (344, 1),
                },
                Interpolation {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (344, 28),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "dataDir",
                     position: (344, 32),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/PG_VERSION; then\n  # Cleanup the data directory.\n  rm -f ",
                 position: (344, 40),
                },
                Interpolation {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (346, 23),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "dataDir",
                     position: (346, 27),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/*.conf\n\n  # Initialise the database.\n  initdb -U ",
                 position: (346, 35),
                },
                Interpolation {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (349, 27),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "superUser",
                     position: (349, 31),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: " ",
                 position: (349, 41),
                },
                Interpolation {
                 expression: FunctionApplication {
                  function: Variable {
                   identifier: "concatStringsSep",
                   position: (349, 44),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: " ",
                      position: (349, 62),
                     },
                    ],
                    position: (349, 61),
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (349, 65),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "initdbArgs",
                       position: (349, 69),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
                Raw {
                 content: "\n\n  # See postStart!\n  touch \"",
                 position: (349, 80),
                },
                Interpolation {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (352, 24),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "dataDir",
                     position: (352, 28),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/.first_startup\"\nfi\n\nln -sfn \"",
                 position: (352, 36),
                },
                Interpolation {
                 expression: Variable {
                  identifier: "configFile",
                  position: (355, 24),
                 },
                },
                Raw {
                 content: "/postgresql.conf\" \"",
                 position: (355, 35),
                },
                Interpolation {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (355, 56),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "dataDir",
                     position: (355, 60),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Raw {
                 content: "/postgresql.conf\"\n",
                 position: (355, 68),
                },
                Interpolation {
                 expression: FunctionApplication {
                  function: Variable {
                   identifier: "optionalString",
                   position: (356, 15),
                  },
                  arguments: [
                   Parentheses {
                    expression: BinaryOperation {
                     operator: NotEqualTo,
                     operands: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (356, 31),
                       },
                       attribute_path: AttributePath {
                        parts: [
                         Raw {
                          content: "recoveryConfig",
                          position: (356, 35),
                         },
                        ],
                       },
                       default: None,
                      },
                      Variable {
                       identifier: "null",
                       position: (356, 53),
                      },
                     ],
                     position: (356, 50),
                    },
                    position: (356, 30),
                   },
                   String {
                    parts: [
                     Raw {
                      content: "ln -sfn \"",
                      position: (357, 1),
                     },
                     Interpolation {
                      expression: FunctionApplication {
                       function: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (357, 26),
                        },
                        attribute_path: AttributePath {
                         parts: [
                          Raw {
                           content: "writeText",
                           position: (357, 31),
                          },
                         ],
                        },
                        default: None,
                       },
                       arguments: [
                        String {
                         parts: [
                          Raw {
                           content: "recovery.conf",
                           position: (357, 42),
                          },
                         ],
                         position: (357, 41),
                        },
                        PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (357, 57),
                         },
                         attribute_path: AttributePath {
                          parts: [
                           Raw {
                            content: "recoveryConfig",
                            position: (357, 61),
                           },
                          ],
                         },
                         default: None,
                        },
                       ],
                      },
                     },
                     Raw {
                      content: "\" \\\n  \"",
                      position: (357, 76),
                     },
                     Interpolation {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (358, 20),
                       },
                       attribute_path: AttributePath {
                        parts: [
                         Raw {
                          content: "dataDir",
                          position: (358, 24),
                         },
                        ],
                       },
                       default: None,
                      },
                     },
                     Raw {
                      content: "/recovery.conf\"\n",
                      position: (358, 32),
                     },
                    ],
                    position: (356, 59),
                   },
                  ],
                 },
                },
                Raw {
                 content: "\n",
                 position: (359, 16),
                },
               ],
               position: (343, 11),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "postStart",
                 position: (363, 9),
                },
               ],
              },
              to: BinaryOperation {
               operator: Addition,
               operands: [
                BinaryOperation {
                 operator: Addition,
                 operands: [
                  String {
                   parts: [
                    Raw {
                     content: "PSQL=\"psql --port=",
                     position: (365, 1),
                    },
                    Interpolation {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "toString",
                       position: (365, 33),
                      },
                      arguments: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (365, 42),
                        },
                        attribute_path: AttributePath {
                         parts: [
                          Raw {
                           content: "port",
                           position: (365, 46),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                    Raw {
                     content: "\"\n\nwhile ! $PSQL -d postgres -c \"\" 2> /dev/null; do\n    if ! kill -0 \"$MAINPID\"; then exit 1; fi\n    sleep 0.1\ndone\n\nif test -e \"",
                     position: (365, 51),
                    },
                    Interpolation {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (372, 27),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "dataDir",
                         position: (372, 31),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "/.first_startup\"; then\n  ",
                     position: (372, 39),
                    },
                    Interpolation {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "optionalString",
                       position: (373, 17),
                      },
                      arguments: [
                       Parentheses {
                        expression: BinaryOperation {
                         operator: NotEqualTo,
                         operands: [
                          PropertyAccess {
                           expression: Variable {
                            identifier: "cfg",
                            position: (373, 33),
                           },
                           attribute_path: AttributePath {
                            parts: [
                             Raw {
                              content: "initialScript",
                              position: (373, 37),
                             },
                            ],
                           },
                           default: None,
                          },
                          Variable {
                           identifier: "null",
                           position: (373, 54),
                          },
                         ],
                         position: (373, 51),
                        },
                        position: (373, 32),
                       },
                       String {
                        parts: [
                         Raw {
                          content: "$PSQL -f \"",
                          position: (374, 1),
                         },
                         Interpolation {
                          expression: PropertyAccess {
                           expression: Variable {
                            identifier: "cfg",
                            position: (374, 29),
                           },
                           attribute_path: AttributePath {
                            parts: [
                             Raw {
                              content: "initialScript",
                              position: (374, 33),
                             },
                            ],
                           },
                           default: None,
                          },
                         },
                         Raw {
                          content: "\" -d postgres\n",
                          position: (374, 47),
                         },
                        ],
                        position: (373, 60),
                       },
                      ],
                     },
                    },
                    Raw {
                     content: "\n  rm -f \"",
                     position: (375, 18),
                    },
                    Interpolation {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (376, 24),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "dataDir",
                         position: (376, 28),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "/.first_startup\"\nfi\n",
                     position: (376, 36),
                    },
                   ],
                   position: (364, 11),
                  },
                  FunctionApplication {
                   function: Variable {
                    identifier: "optionalString",
                    position: (378, 16),
                   },
                   arguments: [
                    Parentheses {
                     expression: BinaryOperation {
                      operator: NotEqualTo,
                      operands: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (378, 32),
                        },
                        attribute_path: AttributePath {
                         parts: [
                          Raw {
                           content: "ensureDatabases",
                           position: (378, 36),
                          },
                         ],
                        },
                        default: None,
                       },
                       List {
                        elements: [],
                        position: (378, 55),
                       },
                      ],
                      position: (378, 52),
                     },
                     position: (378, 31),
                    },
                    String {
                     parts: [
                      Raw {
                       content: "",
                       position: (379, 1),
                      },
                      Interpolation {
                       expression: FunctionApplication {
                        function: Variable {
                         identifier: "concatMapStrings",
                         position: (379, 15),
                        },
                        arguments: [
                         Parentheses {
                          expression: Function {
                           argument: Simple {
                            identifier: "database",
                           },
                           definition: String {
                            parts: [
                             Raw {
                              content: "$PSQL -tAc \"SELECT 1 FROM pg_database WHERE datname = ",
                              position: (380, 1),
                             },
                             Raw {
                              content: "'",
                              position: (380, 69),
                             },
                             Interpolation {
                              expression: Variable {
                               identifier: "database",
                               position: (380, 72),
                              },
                             },
                             Raw {
                              content: "'\" | grep -q 1 || $PSQL -tAc 'CREATE DATABASE \"",
                              position: (380, 81),
                             },
                             Interpolation {
                              expression: Variable {
                               identifier: "database",
                               position: (380, 130),
                              },
                             },
                             Raw {
                              content: "\"'\n",
                              position: (380, 139),
                             },
                            ],
                            position: (379, 43),
                           },
                           position: (379, 33),
                          },
                          position: (379, 32),
                         },
                         PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (381, 17),
                          },
                          attribute_path: AttributePath {
                           parts: [
                            Raw {
                             content: "ensureDatabases",
                             position: (381, 21),
                            },
                           ],
                          },
                          default: None,
                         },
                        ],
                       },
                      },
                      Raw {
                       content: "\n",
                       position: (381, 37),
                      },
                     ],
                     position: (378, 59),
                    },
                   ],
                  },
                 ],
                 position: (378, 14),
                },
                String {
                 parts: [
                  Raw {
                   content: "",
                   position: (383, 1),
                  },
                  Interpolation {
                   expression: FunctionApplication {
                    function: Variable {
                     identifier: "concatMapStrings",
                     position: (383, 15),
                    },
                    arguments: [
                     Parentheses {
                      expression: Function {
                       argument: Simple {
                        identifier: "user",
                       },
                       definition: String {
                        parts: [
                         Raw {
                          content: "$PSQL -tAc \"SELECT 1 FROM pg_roles WHERE rolname=",
                          position: (384, 1),
                         },
                         Raw {
                          content: "'",
                          position: (384, 64),
                         },
                         Interpolation {
                          expression: PropertyAccess {
                           expression: Variable {
                            identifier: "user",
                            position: (384, 67),
                           },
                           attribute_path: AttributePath {
                            parts: [
                             Raw {
                              content: "name",
                              position: (384, 72),
                             },
                            ],
                           },
                           default: None,
                          },
                         },
                         Raw {
                          content: "'\" | grep -q 1 || $PSQL -tAc 'CREATE USER \"",
                          position: (384, 77),
                         },
                         Interpolation {
                          expression: PropertyAccess {
                           expression: Variable {
                            identifier: "user",
                            position: (384, 122),
                           },
                           attribute_path: AttributePath {
                            parts: [
                             Raw {
                              content: "name",
                              position: (384, 127),
                             },
                            ],
                           },
                           default: None,
                          },
                         },
                         Raw {
                          content: "\"'\n",
                          position: (384, 132),
                         },
                         Interpolation {
                          expression: FunctionApplication {
                           function: Variable {
                            identifier: "concatStringsSep",
                            position: (385, 17),
                           },
                           arguments: [
                            String {
                             parts: [
                              Raw {
                               content: "\n",
                               position: (385, 35),
                              },
                             ],
                             position: (385, 34),
                            },
                            Parentheses {
                             expression: FunctionApplication {
                              function: Variable {
                               identifier: "mapAttrsToList",
                               position: (385, 40),
                              },
                              arguments: [
                               Parentheses {
                                expression: Function {
                                 argument: Simple {
                                  identifier: "database",
                                 },
                                 definition: Function {
                                  argument: Simple {
                                   identifier: "permission",
                                  },
                                  definition: String {
                                   parts: [
                                    Raw {
                                     content: "$PSQL -tAc 'GRANT ",
                                     position: (386, 1),
                                    },
                                    Interpolation {
                                     expression: Variable {
                                      identifier: "permission",
                                      position: (386, 37),
                                     },
                                    },
                                    Raw {
                                     content: " ON ",
                                     position: (386, 48),
                                    },
                                    Interpolation {
                                     expression: Variable {
                                      identifier: "database",
                                      position: (386, 54),
                                     },
                                    },
                                    Raw {
                                     content: " TO \"",
                                     position: (386, 63),
                                    },
                                    Interpolation {
                                     expression: PropertyAccess {
                                      expression: Variable {
                                       identifier: "user",
                                       position: (386, 70),
                                      },
                                      attribute_path: AttributePath {
                                       parts: [
                                        Raw {
                                         content: "name",
                                         position: (386, 75),
                                        },
                                       ],
                                      },
                                      default: None,
                                     },
                                    },
                                    Raw {
                                     content: "\"'\n",
                                     position: (386, 80),
                                    },
                                   ],
                                   position: (385, 78),
                                  },
                                  position: (385, 66),
                                 },
                                 position: (385, 56),
                                },
                                position: (385, 55),
                               },
                               PropertyAccess {
                                expression: Variable {
                                 identifier: "user",
                                 position: (387, 19),
                                },
                                attribute_path: AttributePath {
                                 parts: [
                                  Raw {
                                   content: "ensurePermissions",
                                   position: (387, 24),
                                  },
                                 ],
                                },
                                default: None,
                               },
                              ],
                             },
                             position: (385, 39),
                            },
                           ],
                          },
                         },
                         Raw {
                          content: "\n",
                          position: (387, 43),
                         },
                        ],
                        position: (383, 39),
                       },
                       position: (383, 33),
                      },
                      position: (383, 32),
                     },
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (388, 17),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "ensureUsers",
                         position: (388, 21),
                        },
                       ],
                      },
                      default: None,
                     },
                    ],
                   },
                  },
                  Raw {
                   content: "\n",
                   position: (388, 33),
                  },
                 ],
                 position: (382, 16),
                },
               ],
               position: (382, 14),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "serviceConfig",
                 position: (391, 9),
                },
               ],
              },
              to: FunctionApplication {
               function: Variable {
                identifier: "mkMerge",
                position: (391, 25),
               },
               arguments: [
                List {
                 elements: [
                  Map {
                   bindings: [
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "ExecReload",
                        position: (392, 13),
                       },
                      ],
                     },
                     to: String {
                      parts: [
                       Interpolation {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "pkgs",
                          position: (392, 29),
                         },
                         attribute_path: AttributePath {
                          parts: [
                           Raw {
                            content: "coreutils",
                            position: (392, 34),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                       Raw {
                        content: "/bin/kill -HUP $MAINPID",
                        position: (392, 44),
                       },
                      ],
                      position: (392, 26),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "User",
                        position: (393, 13),
                       },
                      ],
                     },
                     to: String {
                      parts: [
                       Raw {
                        content: "postgres",
                        position: (393, 21),
                       },
                      ],
                      position: (393, 20),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "Group",
                        position: (394, 13),
                       },
                      ],
                     },
                     to: String {
                      parts: [
                       Raw {
                        content: "postgres",
                        position: (394, 22),
                       },
                      ],
                      position: (394, 21),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "RuntimeDirectory",
                        position: (395, 13),
                       },
                      ],
                     },
                     to: String {
                      parts: [
                       Raw {
                        content: "postgresql",
                        position: (395, 33),
                       },
                      ],
                      position: (395, 32),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "Type",
                        position: (396, 13),
                       },
                      ],
                     },
                     to: IfThenElse {
                      predicate: FunctionApplication {
                       function: Variable {
                        identifier: "versionAtLeast",
                        position: (396, 23),
                       },
                       arguments: [
                        PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (396, 38),
                         },
                         attribute_path: AttributePath {
                          parts: [
                           Raw {
                            content: "package",
                            position: (396, 42),
                           },
                           Raw {
                            content: "version",
                            position: (396, 50),
                           },
                          ],
                         },
                         default: None,
                        },
                        String {
                         parts: [
                          Raw {
                           content: "9.6",
                           position: (396, 59),
                          },
                         ],
                         position: (396, 58),
                        },
                       ],
                      },
                      then: String {
                       parts: [
                        Raw {
                         content: "notify",
                         position: (397, 26),
                        },
                       ],
                       position: (397, 25),
                      },
                      else_: String {
                       parts: [
                        Raw {
                         content: "simple",
                         position: (398, 26),
                        },
                       ],
                       position: (398, 25),
                      },
                      position: (396, 20),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "KillSignal",
                        position: (402, 13),
                       },
                      ],
                     },
                     to: String {
                      parts: [
                       Raw {
                        content: "SIGINT",
                        position: (402, 27),
                       },
                      ],
                      position: (402, 26),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "KillMode",
                        position: (403, 13),
                       },
                      ],
                     },
                     to: String {
                      parts: [
                       Raw {
                        content: "mixed",
                        position: (403, 25),
                       },
                      ],
                      position: (403, 24),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "TimeoutSec",
                        position: (407, 13),
                       },
                      ],
                     },
                     to: Int {
                      value: 120,
                      position: (407, 26),
                     },
                    },
                    Binding {
                     from: AttributePath {
                      parts: [
                       Raw {
                        content: "ExecStart",
                        position: (409, 13),
                       },
                      ],
                     },
                     to: String {
                      parts: [
                       Interpolation {
                        expression: Variable {
                         identifier: "postgresql",
                         position: (409, 28),
                        },
                       },
                       Raw {
                        content: "/bin/postgres",
                        position: (409, 39),
                       },
                      ],
                      position: (409, 25),
                     },
                    },
                   ],
                   recursive: false,
                   position: (392, 11),
                  },
                  Parentheses {
                   expression: FunctionApplication {
                    function: Variable {
                     identifier: "mkIf",
                     position: (411, 12),
                    },
                    arguments: [
                     Parentheses {
                      expression: BinaryOperation {
                       operator: EqualTo,
                       operands: [
                        PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (411, 18),
                         },
                         attribute_path: AttributePath {
                          parts: [
                           Raw {
                            content: "dataDir",
                            position: (411, 22),
                           },
                          ],
                         },
                         default: None,
                        },
                        String {
                         parts: [
                          Raw {
                           content: "/var/lib/postgresql/",
                           position: (411, 34),
                          },
                          Interpolation {
                           expression: PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (411, 56),
                            },
                            attribute_path: AttributePath {
                             parts: [
                              Raw {
                               content: "package",
                               position: (411, 60),
                              },
                              Raw {
                               content: "psqlSchema",
                               position: (411, 68),
                              },
                             ],
                            },
                            default: None,
                           },
                          },
                         ],
                         position: (411, 33),
                        },
                       ],
                       position: (411, 30),
                      },
                      position: (411, 17),
                     },
                     Map {
                      bindings: [
                       Binding {
                        from: AttributePath {
                         parts: [
                          Raw {
                           content: "StateDirectory",
                           position: (412, 13),
                          },
                         ],
                        },
                        to: String {
                         parts: [
                          Raw {
                           content: "postgresql postgresql/",
                           position: (412, 31),
                          },
                          Interpolation {
                           expression: PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (412, 55),
                            },
                            attribute_path: AttributePath {
                             parts: [
                              Raw {
                               content: "package",
                               position: (412, 59),
                              },
                              Raw {
                               content: "psqlSchema",
                               position: (412, 67),
                              },
                             ],
                            },
                            default: None,
                           },
                          },
                         ],
                         position: (412, 30),
                        },
                       },
                       Binding {
                        from: AttributePath {
                         parts: [
                          Raw {
                           content: "StateDirectoryMode",
                           position: (413, 13),
                          },
                         ],
                        },
                        to: IfThenElse {
                         predicate: Variable {
                          identifier: "groupAccessAvailable",
                          position: (413, 37),
                         },
                         then: String {
                          parts: [
                           Raw {
                            content: "0750",
                            position: (413, 64),
                           },
                          ],
                          position: (413, 63),
                         },
                         else_: String {
                          parts: [
                           Raw {
                            content: "0700",
                            position: (413, 76),
                           },
                          ],
                          position: (413, 75),
                         },
                         position: (413, 34),
                        },
                       },
                      ],
                      recursive: false,
                      position: (411, 82),
                     },
                    ],
                   },
                   position: (411, 11),
                  },
                 ],
                 position: (391, 33),
                },
               ],
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "unitConfig",
                 position: (417, 9),
                },
                Raw {
                 content: "RequiresMountsFor",
                 position: (417, 20),
                },
               ],
              },
              to: String {
               parts: [
                Interpolation {
                 expression: PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (417, 43),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "dataDir",
                     position: (417, 47),
                    },
                   ],
                  },
                  default: None,
                 },
                },
               ],
               position: (417, 40),
              },
             },
            ],
            recursive: false,
            position: (333, 7),
           },
          },
         ],
         recursive: false,
         position: (280, 28),
        },
       ],
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "meta",
         position: (422, 3),
        },
        Raw {
         content: "doc",
         position: (422, 8),
        },
       ],
      },
      to: Path {
       parts: [
        Raw {
         content: "./postgresql.xml",
         position: (422, 14),
        },
       ],
       position: (422, 14),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "meta",
         position: (423, 3),
        },
        Raw {
         content: "maintainers",
         position: (423, 8),
        },
       ],
      },
      to: With {
       expression: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (423, 27),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "maintainers",
           position: (423, 31),
          },
         ],
        },
        default: None,
       },
       target: List {
        elements: [
         Variable {
          identifier: "thoughtpolice",
          position: (423, 46),
         },
         Variable {
          identifier: "danbst",
          position: (423, 60),
         },
        ],
        position: (423, 44),
       },
       position: (423, 22),
      },
     },
    ],
    recursive: false,
    position: (32, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}