---
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: "format",
        position: (6, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (6, 12),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "formats",
          position: (6, 17),
         },
         Raw {
          content: "json",
          position: (6, 25),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (6, 30),
       },
      ],
     },
    },
    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: "influxdb2",
         position: (7, 25),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "configFile",
        position: (8, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "format",
        position: (8, 16),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "generate",
          position: (8, 23),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "config.json",
          position: (8, 33),
         },
        ],
        position: (8, 32),
       },
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (8, 46),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "settings",
           position: (8, 50),
          },
         ],
        },
        default: None,
       },
      ],
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (11, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "services",
            position: (12, 5),
           },
           Raw {
            content: "influxdb2",
            position: (12, 14),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "enable",
               position: (13, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (13, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "the influxdb2 server",
                 position: (13, 32),
                },
               ],
               position: (13, 31),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "package",
               position: (15, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (15, 17),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (16, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (16, 19),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "influxdb2-server",
                     position: (16, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "defaultText",
                    position: (17, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (17, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.influxdb2",
                      position: (17, 42),
                     },
                    ],
                    position: (17, 41),
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (18, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "influxdb2 derivation to use.",
                    position: (18, 24),
                   },
                  ],
                  position: (18, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (19, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (19, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "package",
                     position: (19, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
               ],
               recursive: false,
               position: (15, 26),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "settings",
               position: (22, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (22, 18),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (23, 9),
                   },
                  ],
                 },
                 to: Map {
                  bindings: [],
                  recursive: false,
                  position: (23, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (24, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "configuration options for influxdb2, see <link xlink:href=\"https://docs.influxdata.com/influxdb/v2.0/reference/config-options\"/> for details.",
                    position: (24, 25),
                   },
                  ],
                  position: (24, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (25, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "format",
                   position: (25, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "type",
                     position: (25, 23),
                    },
                   ],
                  },
                  default: None,
                 },
                },
               ],
               recursive: false,
               position: (22, 27),
              },
             ],
            },
           },
          ],
          recursive: false,
          position: (12, 26),
         },
        },
       ],
       recursive: false,
       position: (11, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (30, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (30, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (30, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (30, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "assertions",
              position: (31, 5),
             },
            ],
           },
           to: List {
            elements: [
             Map {
              bindings: [
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "assertion",
                   position: (32, 7),
                  },
                 ],
                },
                to: BinaryOperation {
                 operator: LogicalAnd,
                 operands: [
                  UnaryOperation {
                   operator: Not,
                   operand: Parentheses {
                    expression: FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "builtins",
                       position: (32, 21),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "hasAttr",
                         position: (32, 30),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      String {
                       parts: [
                        Raw {
                         content: "bolt-path",
                         position: (32, 39),
                        },
                       ],
                       position: (32, 38),
                      },
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (32, 50),
                       },
                       attribute_path: AttributePath {
                        parts: [
                         Raw {
                          content: "settings",
                          position: (32, 54),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                    position: (32, 20),
                   },
                   position: (32, 19),
                  },
                  UnaryOperation {
                   operator: Not,
                   operand: Parentheses {
                    expression: FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "builtins",
                       position: (32, 69),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "hasAttr",
                         position: (32, 78),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      String {
                       parts: [
                        Raw {
                         content: "engine-path",
                         position: (32, 87),
                        },
                       ],
                       position: (32, 86),
                      },
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (32, 100),
                       },
                       attribute_path: AttributePath {
                        parts: [
                         Raw {
                          content: "settings",
                          position: (32, 104),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                    position: (32, 68),
                   },
                   position: (32, 67),
                  },
                 ],
                 position: (32, 64),
                },
               },
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "message",
                   position: (33, 7),
                  },
                 ],
                },
                to: String {
                 parts: [
                  Raw {
                   content: "services.influxdb2.config: bolt-path and engine-path should not be set as they are managed by systemd",
                   position: (33, 18),
                  },
                 ],
                 position: (33, 17),
                },
               },
              ],
              recursive: false,
              position: (31, 19),
             },
            ],
            position: (31, 18),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (36, 5),
             },
             Raw {
              content: "services",
              position: (36, 13),
             },
             Raw {
              content: "influxdb2",
              position: (36, 22),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (37, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "InfluxDB is an open-source, distributed, time series database",
                 position: (37, 22),
                },
               ],
               position: (37, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "documentation",
                 position: (38, 7),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "https://docs.influxdata.com/influxdb/",
                   position: (38, 26),
                  },
                 ],
                 position: (38, 25),
                },
               ],
               position: (38, 23),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "wantedBy",
                 position: (39, 7),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (39, 21),
                  },
                 ],
                 position: (39, 20),
                },
               ],
               position: (39, 18),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "after",
                 position: (40, 7),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (40, 18),
                  },
                 ],
                 position: (40, 17),
                },
               ],
               position: (40, 15),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "environment",
                 position: (41, 7),
                },
               ],
              },
              to: Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "INFLUXD_CONFIG_PATH",
                    position: (42, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "configFile",
                  position: (42, 31),
                 },
                },
               ],
               recursive: false,
               position: (41, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "serviceConfig",
                 position: (44, 7),
                },
               ],
              },
              to: Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "ExecStart",
                    position: (45, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Interpolation {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (45, 24),
                     },
                     attribute_path: AttributePath {
                      parts: [
                       Raw {
                        content: "package",
                        position: (45, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/influxd --bolt-path ${STATE_DIRECTORY}/influxd.bolt --engine-path ${STATE_DIRECTORY}/engine",
                    position: (45, 36),
                   },
                  ],
                  position: (45, 21),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "StateDirectory",
                    position: (46, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "influxdb2",
                    position: (46, 27),
                   },
                  ],
                  position: (46, 26),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "User",
                    position: (47, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "influxdb2",
                    position: (47, 17),
                   },
                  ],
                  position: (47, 16),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "Group",
                    position: (48, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "influxdb2",
                    position: (48, 18),
                   },
                  ],
                  position: (48, 17),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "CapabilityBoundingSet",
                    position: (49, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [],
                  position: (49, 33),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "SystemCallFilter",
                    position: (50, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "@system-service",
                    position: (50, 29),
                   },
                  ],
                  position: (50, 28),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "LimitNOFILE",
                    position: (51, 9),
                   },
                  ],
                 },
                 to: Int {
                  value: 65536,
                  position: (51, 23),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "KillMode",
                    position: (52, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "control-group",
                    position: (52, 21),
                   },
                  ],
                  position: (52, 20),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "Restart",
                    position: (53, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (53, 20),
                   },
                  ],
                  position: (53, 19),
                 },
                },
               ],
               recursive: false,
               position: (44, 23),
              },
             },
            ],
            recursive: false,
            position: (36, 34),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "users",
              position: (57, 5),
             },
             Raw {
              content: "extraUsers",
              position: (57, 11),
             },
             Raw {
              content: "influxdb2",
              position: (57, 22),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "isSystemUser",
                 position: (58, 7),
                },
               ],
              },
              to: Variable {
               identifier: "true",
               position: (58, 22),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "group",
                 position: (59, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "influxdb2",
                 position: (59, 16),
                },
               ],
               position: (59, 15),
              },
             },
            ],
            recursive: false,
            position: (57, 34),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "users",
              position: (62, 5),
             },
             Raw {
              content: "extraGroups",
              position: (62, 11),
             },
             Raw {
              content: "influxdb2",
              position: (62, 23),
             },
            ],
           },
           to: Map {
            bindings: [],
            recursive: false,
            position: (62, 35),
           },
          },
         ],
         recursive: false,
         position: (30, 28),
        },
       ],
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "meta",
         position: (65, 3),
        },
        Raw {
         content: "maintainers",
         position: (65, 8),
        },
       ],
      },
      to: With {
       expression: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (65, 27),
        },
        attribute_path: AttributePath {
         parts: [
          Raw {
           content: "maintainers",
           position: (65, 31),
          },
         ],
        },
        default: None,
       },
       target: List {
        elements: [
         Variable {
          identifier: "nickcao",
          position: (65, 46),
         },
        ],
        position: (65, 44),
       },
       position: (65, 22),
      },
     },
    ],
    recursive: false,
    position: (10, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}