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