---
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: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "borgmatic",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfgfile",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 13),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "writeText",
          position: (7, 18),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "config.yaml",
          position: (7, 29),
         },
        ],
       },
       FunctionApplication {
        function: PropertyAccess {
         expression: Variable {
          identifier: "builtins",
          position: (7, 43),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "toJSON",
            position: (7, 52),
           },
          ],
         },
         default: None,
        },
        arguments: [
         PropertyAccess {
          expression: Variable {
           identifier: "cfg",
           position: (7, 59),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "settings",
             position: (7, 63),
            },
           ],
          },
          default: None,
         },
        ],
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (9, 3),
        },
        Raw {
         content: "services",
         position: (9, 11),
        },
        Raw {
         content: "borgmatic",
         position: (9, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (10, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (10, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "borgmatic",
              position: (10, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "settings",
            position: (12, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (12, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (13, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "See https://torsion.org/borgmatic/docs/reference/configuration/\n",
                 position: (14, 1),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (16, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (16, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "submodule",
                   position: (16, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "freeformType",
                      position: (17, 9),
                     },
                    ],
                   },
                   With {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "lib",
                      position: (17, 29),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "types",
                        position: (17, 33),
                       },
                      ],
                     },
                     default: None,
                    },
                    target: FunctionApplication {
                     function: Variable {
                      identifier: "attrsOf",
                      position: (17, 40),
                     },
                     arguments: [
                      Variable {
                       identifier: "anything",
                       position: (17, 48),
                      },
                     ],
                    },
                    position: (17, 24),
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "options",
                      position: (18, 9),
                     },
                     Raw {
                      content: "location",
                      position: (18, 17),
                     },
                    ],
                   },
                   Map {
                    bindings: [
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "source_directories",
                         position: (19, 11),
                        },
                       ],
                      },
                      FunctionApplication {
                       function: Variable {
                        identifier: "mkOption",
                        position: (19, 32),
                       },
                       arguments: [
                        Map {
                         bindings: [
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "type",
                              position: (20, 13),
                             },
                            ],
                           },
                           FunctionApplication {
                            function: PropertyAccess {
                             expression: Variable {
                              identifier: "types",
                              position: (20, 20),
                             },
                             attribute_path: AttributePath {
                              attributes: [
                               Raw {
                                content: "listOf",
                                position: (20, 26),
                               },
                              ],
                             },
                             default: None,
                            },
                            arguments: [
                             PropertyAccess {
                              expression: Variable {
                               identifier: "types",
                               position: (20, 33),
                              },
                              attribute_path: AttributePath {
                               attributes: [
                                Raw {
                                 content: "str",
                                 position: (20, 39),
                                },
                               ],
                              },
                              default: None,
                             },
                            ],
                           },
                          ),
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "description",
                              position: (21, 13),
                             },
                            ],
                           },
                           String {
                            parts: [
                             Raw {
                              content: "List of source directories to backup (required). Globs and\ntildes are expanded.\n",
                              position: (22, 1),
                             },
                            ],
                           },
                          ),
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "example",
                              position: (25, 13),
                             },
                            ],
                           },
                           List {
                            elements: [
                             String {
                              parts: [
                               Raw {
                                content: "/home",
                                position: (25, 26),
                               },
                              ],
                             },
                             String {
                              parts: [
                               Raw {
                                content: "/etc",
                                position: (25, 34),
                               },
                              ],
                             },
                             String {
                              parts: [
                               Raw {
                                content: "/var/log/syslog*",
                                position: (25, 41),
                               },
                              ],
                             },
                            ],
                            position: (25, 23),
                           },
                          ),
                         ],
                         recursive: false,
                         position: (19, 41),
                        },
                       ],
                      },
                     ),
                     KeyValue(
                      AttributePath {
                       attributes: [
                        Raw {
                         content: "repositories",
                         position: (27, 11),
                        },
                       ],
                      },
                      FunctionApplication {
                       function: Variable {
                        identifier: "mkOption",
                        position: (27, 26),
                       },
                       arguments: [
                        Map {
                         bindings: [
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "type",
                              position: (28, 13),
                             },
                            ],
                           },
                           FunctionApplication {
                            function: PropertyAccess {
                             expression: Variable {
                              identifier: "types",
                              position: (28, 20),
                             },
                             attribute_path: AttributePath {
                              attributes: [
                               Raw {
                                content: "listOf",
                                position: (28, 26),
                               },
                              ],
                             },
                             default: None,
                            },
                            arguments: [
                             PropertyAccess {
                              expression: Variable {
                               identifier: "types",
                               position: (28, 33),
                              },
                              attribute_path: AttributePath {
                               attributes: [
                                Raw {
                                 content: "str",
                                 position: (28, 39),
                                },
                               ],
                              },
                              default: None,
                             },
                            ],
                           },
                          ),
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "description",
                              position: (29, 13),
                             },
                            ],
                           },
                           String {
                            parts: [
                             Raw {
                              content: "Paths to local or remote repositories (required). Tildes are\nexpanded. Multiple repositories are backed up to in\nsequence. Borg placeholders can be used. See the output of\n\"borg help placeholders\" for details. See ssh_command for\nSSH options like identity file or port. If systemd service\nis used, then add local repository paths in the systemd\nservice file to the ReadWritePaths list.\n",
                              position: (30, 1),
                             },
                            ],
                           },
                          ),
                          KeyValue(
                           AttributePath {
                            attributes: [
                             Raw {
                              content: "example",
                              position: (38, 13),
                             },
                            ],
                           },
                           List {
                            elements: [
                             String {
                              parts: [
                               Raw {
                                content: "user@backupserver:sourcehostname.borg",
                                position: (39, 16),
                               },
                              ],
                             },
                             String {
                              parts: [
                               Raw {
                                content: "user@backupserver:{fqdn}",
                                position: (40, 16),
                               },
                              ],
                             },
                            ],
                            position: (38, 23),
                           },
                          ),
                         ],
                         recursive: false,
                         position: (27, 35),
                        },
                       ],
                      },
                     ),
                    ],
                    recursive: false,
                    position: (18, 28),
                   },
                  ),
                 ],
                 recursive: false,
                 position: (16, 30),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (12, 25),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (9, 32),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (48, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (48, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (48, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (48, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (50, 5),
             },
             Raw {
              content: "systemPackages",
              position: (50, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (50, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "borgmatic",
                 position: (50, 41),
                },
               ],
              },
              default: None,
             },
            ],
            position: (50, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (52, 5),
             },
             Raw {
              content: "etc",
              position: (52, 17),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "borgmatic/config.yaml",
                 position: (52, 22),
                },
               ],
              },
             },
             Raw {
              content: "source",
              position: (52, 45),
             },
            ],
           },
           Variable {
            identifier: "cfgfile",
            position: (52, 54),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (54, 5),
             },
             Raw {
              content: "packages",
              position: (54, 13),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (54, 26),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "borgmatic",
                 position: (54, 31),
                },
               ],
              },
              default: None,
             },
            ],
            position: (54, 24),
           },
          ),
         ],
         recursive: false,
         position: (48, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (8, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}