---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: LetIn {
  bindings: [
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "cfg",
       position: (3, 3),
      },
     ],
    },
    PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (3, 9),
     },
     attribute_path: AttributePath {
      attributes: [
       Raw {
        content: "services",
        position: (3, 16),
       },
       Raw {
        content: "meshcentral",
        position: (3, 25),
       },
      ],
     },
     default: None,
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "configFormat",
       position: (4, 3),
      },
     ],
    },
    FunctionApplication {
     function: PropertyAccess {
      expression: Variable {
       identifier: "pkgs",
       position: (4, 18),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "formats",
         position: (4, 23),
        },
        Raw {
         content: "json",
         position: (4, 31),
        },
       ],
      },
      default: None,
     },
     arguments: [
      Map {
       bindings: [],
       recursive: false,
       position: (4, 36),
      },
     ],
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "configFile",
       position: (5, 3),
      },
     ],
    },
    FunctionApplication {
     function: PropertyAccess {
      expression: Variable {
       identifier: "configFormat",
       position: (5, 16),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "generate",
         position: (5, 29),
        },
       ],
      },
      default: None,
     },
     arguments: [
      String {
       parts: [
        Raw {
         content: "meshcentral-config.json",
         position: (5, 39),
        },
       ],
      },
      PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (5, 64),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "settings",
          position: (5, 68),
         },
        ],
       },
       default: None,
      },
     ],
    },
   ),
  ],
  target: With {
   expression: Variable {
    identifier: "lib",
    position: (6, 9),
   },
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (7, 3),
        },
        Raw {
         content: "services",
         position: (7, 11),
        },
        Raw {
         content: "meshcentral",
         position: (7, 20),
        },
       ],
      },
      With {
       expression: Variable {
        identifier: "types",
        position: (7, 39),
       },
       target: Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "enable",
             position: (8, 5),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "mkEnableOption",
            position: (8, 14),
           },
           arguments: [
            String {
             parts: [
              Raw {
               content: "MeshCentral computer management server",
               position: (8, 30),
              },
             ],
            },
           ],
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "package",
             position: (9, 5),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "mkOption",
            position: (9, 15),
           },
           arguments: [
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "description",
                  position: (10, 7),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "MeshCentral package to use. Replacing this may be necessary to add dependencies for extra functionality.",
                  position: (10, 22),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "type",
                  position: (11, 7),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (11, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "package",
                   position: (11, 20),
                  },
                 ],
                },
                default: None,
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "default",
                  position: (12, 7),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "pkgs",
                 position: (12, 17),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "meshcentral",
                   position: (12, 22),
                  },
                 ],
                },
                default: None,
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "defaultText",
                  position: (13, 7),
                 },
                ],
               },
               FunctionApplication {
                function: Variable {
                 identifier: "literalExpression",
                 position: (13, 21),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: "pkgs.meshcentral",
                    position: (13, 40),
                   },
                  ],
                 },
                ],
               },
              ),
             ],
             recursive: false,
             position: (9, 24),
            },
           ],
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "settings",
             position: (15, 5),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "mkOption",
            position: (15, 16),
           },
           arguments: [
            Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "description",
                  position: (16, 7),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "Settings for MeshCentral. Refer to upstream documentation for details:\n\n<itemizedlist>\n  <listitem><para><link xlink:href=\"https://github.com/Ylianst/MeshCentral/blob/master/meshcentral-config-schema.json\">JSON Schema definition</link></para></listitem>\n  <listitem><para><link xlink:href=\"https://github.com/Ylianst/MeshCentral/blob/master/sample-config.json\">simple sample configuration</link></para></listitem>\n  <listitem><para><link xlink:href=\"https://github.com/Ylianst/MeshCentral/blob/master/sample-config-advanced.json\">complex sample configuration</link></para></listitem>\n  <listitem><para><link xlink:href=\"https://www.meshcommander.com/meshcentral2\">Old homepage) with documentation link</link></para></listitem>\n</itemizedlist>\n",
                  position: (17, 1),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "type",
                  position: (26, 7),
                 },
                ],
               },
               FunctionApplication {
                function: PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (26, 14),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "submodule",
                    position: (26, 20),
                   },
                  ],
                 },
                 default: None,
                },
                arguments: [
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "freeformType",
                       position: (27, 9),
                      },
                     ],
                    },
                    PropertyAccess {
                     expression: Variable {
                      identifier: "configFormat",
                      position: (27, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "type",
                        position: (27, 37),
                       },
                      ],
                     },
                     default: None,
                    },
                   ),
                  ],
                  recursive: false,
                  position: (26, 30),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "example",
                  position: (29, 7),
                 },
                ],
               },
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "settings",
                     position: (30, 9),
                    },
                   ],
                  },
                  Map {
                   bindings: [
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "WANonly",
                        position: (31, 11),
                       },
                      ],
                     },
                     Variable {
                      identifier: "true",
                      position: (31, 21),
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "Cert",
                        position: (32, 11),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "meshcentral.example.com",
                        position: (32, 19),
                       },
                      ],
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "TlsOffload",
                        position: (33, 11),
                       },
                      ],
                     },
                     String {
                      parts: [
                       Raw {
                        content: "10.0.0.2,fd42::2",
                        position: (33, 25),
                       },
                      ],
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "Port",
                        position: (34, 11),
                       },
                      ],
                     },
                     Int {
                      value: 4430,
                      position: (34, 18),
                     },
                    ),
                   ],
                   recursive: false,
                   position: (30, 20),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "domains",
                     position: (36, 9),
                    },
                    Expression {
                     expression: String {
                      parts: [],
                     },
                    },
                    Raw {
                     content: "certUrl",
                     position: (36, 20),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "https://meshcentral.example.com/",
                     position: (36, 31),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (29, 17),
               },
              ),
             ],
             recursive: false,
             position: (15, 25),
            },
           ],
          },
         ),
        ],
        recursive: false,
        position: (7, 46),
       },
       position: (7, 34),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (40, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (40, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (40, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (40, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (41, 5),
             },
             Raw {
              content: "meshcentral",
              position: (41, 14),
             },
             Raw {
              content: "settings",
              position: (41, 26),
             },
             Raw {
              content: "settings",
              position: (41, 35),
             },
             Raw {
              content: "autoBackup",
              position: (41, 44),
             },
             Raw {
              content: "backupPath",
              position: (41, 55),
             },
            ],
           },
           FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "lib",
              position: (41, 68),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "mkDefault",
                position: (41, 72),
               },
              ],
             },
             default: None,
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: "/var/lib/meshcentral/backups",
                position: (41, 83),
               },
              ],
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (42, 5),
             },
             Raw {
              content: "services",
              position: (42, 13),
             },
             Raw {
              content: "meshcentral",
              position: (42, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (43, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (43, 20),
                  },
                 ],
                },
               ],
               position: (43, 18),
              },
             ),
             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/meshcentral --datapath /var/lib/meshcentral --configfile ",
                    position: (45, 36),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "configFile",
                     position: (45, 100),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (46, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (46, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "StateDirectory",
                    position: (47, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "meshcentral",
                    position: (47, 27),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "CacheDirectory",
                    position: (48, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "meshcentral",
                    position: (48, 27),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (44, 23),
              },
             ),
            ],
            recursive: false,
            position: (42, 36),
           },
          ),
         ],
         recursive: false,
         position: (40, 28),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (52, 3),
        },
        Raw {
         content: "maintainers",
         position: (52, 8),
        },
       ],
      },
      List {
       elements: [
        PropertyAccess {
         expression: Variable {
          identifier: "maintainers",
          position: (52, 24),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "lheckemann",
            position: (52, 36),
           },
          ],
         },
         default: None,
        },
       ],
       position: (52, 22),
      },
     ),
    ],
    recursive: false,
    position: (6, 14),
   },
   position: (6, 4),
  },
  position: (2, 1),
 },
 position: (1, 1),
}