---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    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: "confd",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "confdConfig",
        position: (8, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "backend = \"",
        position: (9, 1),
       },
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (9, 18),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "backend",
            position: (9, 22),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "\"\nconfdir = \"",
        position: (9, 30),
       },
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (10, 18),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "confDir",
            position: (10, 22),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "\"\ninterval = ",
        position: (10, 30),
       },
       Expression {
        expression: FunctionApplication {
         function: Variable {
          identifier: "toString",
          position: (11, 18),
         },
         arguments: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (11, 27),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "interval",
              position: (11, 31),
             },
            ],
           },
           default: None,
          },
         ],
        },
       },
       Raw {
        content: "\nnodes = [ ",
        position: (11, 40),
       },
       Expression {
        expression: FunctionApplication {
         function: Variable {
          identifier: "concatMapStringsSep",
          position: (12, 17),
         },
         arguments: [
          String {
           parts: [
            Raw {
             content: ",",
             position: (12, 38),
            },
           ],
          },
          Function {
           argument: Some(
            "s",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: String {
            parts: [
             Raw {
              content: "\"",
              position: (12, 47),
             },
             Expression {
              expression: Variable {
               identifier: "s",
               position: (12, 50),
              },
             },
             Raw {
              content: "\"",
              position: (12, 52),
             },
            ],
           },
           position: (12, 42),
          },
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (12, 57),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "nodes",
              position: (12, 61),
             },
            ],
           },
           default: None,
          },
         ],
        },
       },
       Raw {
        content: ", ]\nprefix = \"",
        position: (12, 67),
       },
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (13, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "prefix",
            position: (13, 21),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "\"\nlog-level = \"",
        position: (13, 28),
       },
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (14, 20),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "logLevel",
            position: (14, 24),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "\"\nwatch = ",
        position: (14, 33),
       },
       Expression {
        expression: FunctionApplication {
         function: Variable {
          identifier: "boolToString",
          position: (15, 15),
         },
         arguments: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (15, 28),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "watch",
              position: (15, 32),
             },
            ],
           },
           default: None,
          },
         ],
        },
       },
       Raw {
        content: "\n",
        position: (15, 38),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (19, 3),
        },
        Raw {
         content: "services",
         position: (19, 11),
        },
        Raw {
         content: "confd",
         position: (19, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (20, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (20, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "confd service",
              position: (20, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "backend",
            position: (22, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (22, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (23, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Confd config storage backend to use.",
                 position: (23, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (24, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "etcd",
                 position: (24, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (25, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (25, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "enum",
                   position: (25, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "etcd",
                     position: (25, 27),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "consul",
                     position: (25, 34),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "redis",
                     position: (25, 43),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "zookeeper",
                     position: (25, 51),
                    },
                   ],
                  },
                 ],
                 position: (25, 25),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (22, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "interval",
            position: (28, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (28, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (29, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Confd check interval.",
                 position: (29, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (30, 7),
                },
               ],
              },
              Int {
               value: 10,
               position: (30, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (31, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (31, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "int",
                  position: (31, 20),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (28, 25),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "nodes",
            position: (34, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (34, 13),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (35, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Confd list of nodes to connect to.",
                 position: (35, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (36, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "http://127.0.0.1:2379",
                   position: (36, 20),
                  },
                 ],
                },
               ],
               position: (36, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (37, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (37, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listOf",
                   position: (37, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (37, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (37, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (34, 22),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "watch",
            position: (40, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (40, 13),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (41, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Confd, whether to watch etcd config for changes.",
                 position: (41, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (42, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (42, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (43, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (43, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (43, 20),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (40, 22),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "prefix",
            position: (46, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (46, 14),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (47, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The string to prefix to keys.",
                 position: (47, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (48, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/",
                 position: (48, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (49, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (49, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (49, 20),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (46, 23),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "logLevel",
            position: (52, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (52, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (53, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Confd log level.",
                 position: (53, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (54, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "info",
                 position: (54, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (55, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (55, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "enum",
                   position: (55, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "info",
                     position: (55, 27),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "debug",
                     position: (55, 34),
                    },
                   ],
                  },
                 ],
                 position: (55, 25),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (52, 25),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "confDir",
            position: (58, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (58, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (59, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The path to the confd configs.",
                 position: (59, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (60, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/etc/confd",
                 position: (60, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (61, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (61, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "path",
                  position: (61, 20),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (58, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "package",
            position: (64, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (64, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (65, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Confd package to use.",
                 position: (65, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (66, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (66, 17),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "confd",
                  position: (66, 22),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (67, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (67, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.confd",
                   position: (67, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (68, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (68, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "package",
                  position: (68, 20),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (64, 24),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (19, 28),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (72, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (72, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (72, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (72, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (73, 5),
             },
             Raw {
              content: "services",
              position: (73, 13),
             },
             Raw {
              content: "confd",
              position: (73, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (74, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Confd Service.",
                 position: (74, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (75, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (75, 21),
                  },
                 ],
                },
               ],
               position: (75, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (76, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (76, 18),
                  },
                 ],
                },
               ],
               position: (76, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (77, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (78, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (78, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (78, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/confd",
                    position: (78, 36),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (77, 23),
              },
             ),
            ],
            recursive: false,
            position: (73, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (82, 5),
             },
             Raw {
              content: "etc",
              position: (82, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Expression {
                 expression: String {
                  parts: [
                   Raw {
                    content: "confd/confd.toml",
                    position: (83, 8),
                   },
                  ],
                 },
                },
                Raw {
                 content: "text",
                 position: (83, 26),
                },
               ],
              },
              Variable {
               identifier: "confdConfig",
               position: (83, 33),
              },
             ),
            ],
            recursive: false,
            position: (82, 23),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (86, 5),
             },
             Raw {
              content: "systemPackages",
              position: (86, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (86, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (86, 40),
                },
               ],
              },
              default: None,
             },
            ],
            position: (86, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (88, 5),
             },
             Raw {
              content: "etcd",
              position: (88, 14),
             },
             Raw {
              content: "enable",
              position: (88, 19),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (88, 28),
            },
            arguments: [
             BinaryOperation {
              operator: EqualTo,
              operands: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (88, 34),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "backend",
                   position: (88, 38),
                  },
                 ],
                },
                default: None,
               },
               String {
                parts: [
                 Raw {
                  content: "etcd",
                  position: (88, 50),
                 },
                ],
               },
              ],
              position: (88, 46),
             },
             FunctionApplication {
              function: Variable {
               identifier: "mkDefault",
               position: (88, 58),
              },
              arguments: [
               Variable {
                identifier: "true",
                position: (88, 68),
               },
              ],
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (72, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (18, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}