---
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: "cfg",
        position: (4, 5),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (4, 11),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (4, 18),
        },
        Raw {
         content: "vector",
         position: (4, 27),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (8, 3),
        },
        Raw {
         content: "services",
         position: (8, 11),
        },
        Raw {
         content: "vector",
         position: (8, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (9, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (9, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "Vector",
              position: (9, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "journaldAccess",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (11, 22),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (12, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (12, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (12, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (13, 7),
                },
               ],
              },
              Variable {
               identifier: "false",
               position: (13, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (14, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Enable Vector to access journald.\n",
                 position: (15, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (11, 31),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "settings",
            position: (19, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (19, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (20, 7),
                },
               ],
              },
              PropertyAccess {
               expression: FunctionApplication {
                function: PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (20, 15),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "formats",
                    position: (20, 20),
                   },
                   Raw {
                    content: "json",
                    position: (20, 28),
                   },
                  ],
                 },
                 default: None,
                },
                arguments: [
                 Map {
                  bindings: [],
                  recursive: false,
                  position: (20, 33),
                 },
                ],
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "type",
                  position: (20, 38),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (21, 7),
                },
               ],
              },
              Map {
               bindings: [],
               recursive: false,
               position: (21, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (22, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Specify the configuration for Vector in Nix.\n",
                 position: (23, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (19, 25),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (8, 29),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (28, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (28, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (28, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (28, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (30, 5),
             },
             Raw {
              content: "groups",
              position: (30, 11),
             },
             Raw {
              content: "vector",
              position: (30, 18),
             },
            ],
           },
           Map {
            bindings: [],
            recursive: false,
            position: (30, 27),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (31, 5),
             },
             Raw {
              content: "users",
              position: (31, 11),
             },
             Raw {
              content: "vector",
              position: (31, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (32, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Vector service user",
                 position: (32, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "group",
                 position: (33, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "vector",
                 position: (33, 16),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "isSystemUser",
                 position: (34, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (34, 22),
              },
             ),
            ],
            recursive: false,
            position: (31, 26),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (36, 5),
             },
             Raw {
              content: "services",
              position: (36, 13),
             },
             Raw {
              content: "vector",
              position: (36, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (37, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Vector event and log aggregator",
                 position: (37, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (38, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (38, 21),
                  },
                 ],
                },
               ],
               position: (38, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (39, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network-online.target",
                   position: (39, 18),
                  },
                 ],
                },
               ],
               position: (39, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "requires",
                 position: (40, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network-online.target",
                   position: (40, 21),
                  },
                 ],
                },
               ],
               position: (40, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (41, 7),
                },
               ],
              },
              LetIn {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "format",
                    position: (43, 11),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (43, 20),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "formats",
                      position: (43, 25),
                     },
                     Raw {
                      content: "toml",
                      position: (43, 33),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   Map {
                    bindings: [],
                    recursive: false,
                    position: (43, 38),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "conf",
                    position: (44, 11),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "format",
                    position: (44, 18),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "generate",
                      position: (44, 25),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "vector.toml",
                      position: (44, 35),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (44, 48),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "settings",
                       position: (44, 52),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "validateConfig",
                    position: (45, 11),
                   },
                  ],
                 },
                 Function {
                  argument: Some(
                   "file",
                  ),
                  arguments: FunctionArguments {
                   arguments: [],
                   ellipsis: false,
                  },
                  definition: FunctionApplication {
                   function: PropertyAccess {
                    expression: Variable {
                     identifier: "pkgs",
                     position: (46, 13),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "runCommand",
                       position: (46, 18),
                      },
                     ],
                    },
                    default: None,
                   },
                   arguments: [
                    String {
                     parts: [
                      Raw {
                       content: "validate-vector-conf",
                       position: (46, 30),
                      },
                     ],
                    },
                    Map {
                     bindings: [],
                     recursive: false,
                     position: (46, 52),
                    },
                    String {
                     parts: [
                      Raw {
                       content: "",
                       position: (47, 1),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (47, 17),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "vector",
                           position: (47, 22),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "/bin/vector validate --no-environment \"",
                       position: (47, 29),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "file",
                        position: (47, 70),
                       },
                      },
                      Raw {
                       content: "\"\nln -s \"",
                       position: (47, 75),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "file",
                        position: (48, 24),
                       },
                      },
                      Raw {
                       content: "\" \"$out\"\n",
                       position: (48, 29),
                      },
                     ],
                    },
                   ],
                  },
                  position: (45, 28),
                 },
                ),
               ],
               target: Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "ExecStart",
                     position: (52, 11),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "pkgs",
                       position: (52, 26),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "vector",
                         position: (52, 31),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "/bin/vector --config ",
                     position: (52, 38),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "validateConfig",
                       position: (52, 61),
                      },
                      arguments: [
                       Variable {
                        identifier: "conf",
                        position: (52, 76),
                       },
                      ],
                     },
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "User",
                     position: (53, 11),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "vector",
                     position: (53, 19),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "Group",
                     position: (54, 11),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "vector",
                     position: (54, 20),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "Restart",
                     position: (55, 11),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "no",
                     position: (55, 22),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "StateDirectory",
                     position: (56, 11),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "vector",
                     position: (56, 29),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "ExecReload",
                     position: (57, 11),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "pkgs",
                       position: (57, 27),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "coreutils",
                         position: (57, 32),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: "/bin/kill -HUP $MAINPID",
                     position: (57, 42),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "AmbientCapabilities",
                     position: (58, 11),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "CAP_NET_BIND_SERVICE",
                     position: (58, 34),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "SupplementaryGroups",
                     position: (60, 11),
                    },
                   ],
                  },
                  FunctionApplication {
                   function: Variable {
                    identifier: "mkIf",
                    position: (60, 33),
                   },
                   arguments: [
                    PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (60, 38),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "journaldAccess",
                        position: (60, 42),
                       },
                      ],
                     },
                     default: None,
                    },
                    String {
                     parts: [
                      Raw {
                       content: "systemd-journal",
                       position: (60, 58),
                      },
                     ],
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (51, 9),
               },
               position: (42, 9),
              },
             ),
            ],
            recursive: false,
            position: (36, 31),
           },
          ),
         ],
         recursive: false,
         position: (28, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (7, 1),
   },
   position: (4, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}