---
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: "hail",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (12, 3),
        },
        Raw {
         content: "services",
         position: (12, 11),
        },
        Raw {
         content: "hail",
         position: (12, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (13, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (13, 14),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (14, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (14, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (14, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (15, 7),
                },
               ],
              },
              Variable {
               identifier: "false",
               position: (15, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (16, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "        Enables the Hail Auto Update Service. Hail can automatically deploy artifacts\nbuilt by a Hydra Continous Integration server. A common use case is to provide\ncontinous deployment for single services or a full NixOS configuration.",
                 position: (17, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (13, 23),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "profile",
            position: (21, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (21, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (22, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (22, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (22, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (23, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "hail-profile",
                 position: (23, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (24, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The name of the Nix profile used by Hail.",
                 position: (24, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (21, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "hydraJobUri",
            position: (26, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (26, 19),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (27, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (27, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (27, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (28, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The URI of the Hydra Job.",
                 position: (28, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (26, 28),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "netrc",
            position: (30, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (30, 13),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (31, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (31, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "nullOr",
                   position: (31, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (31, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (31, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (32, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The netrc file to use when fetching data from Hydra.",
                 position: (32, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (33, 7),
                },
               ],
              },
              Variable {
               identifier: "null",
               position: (33, 17),
              },
             ),
            ],
            recursive: false,
            position: (30, 22),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "package",
            position: (35, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (35, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (36, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (36, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "package",
                  position: (36, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (37, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (37, 17),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "haskellPackages",
                  position: (37, 22),
                 },
                 Raw {
                  content: "hail",
                  position: (37, 38),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (38, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (38, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.haskellPackages.hail",
                   position: (38, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (39, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Hail package to use.",
                 position: (39, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (35, 24),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (12, 27),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (46, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (46, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (46, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (46, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (47, 5),
             },
             Raw {
              content: "services",
              position: (47, 13),
             },
             Raw {
              content: "hail",
              position: (47, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (48, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Hail Auto Update Service",
                 position: (48, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wants",
                 position: (49, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network-online.target",
                   position: (49, 18),
                  },
                 ],
                },
               ],
               position: (49, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (50, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (50, 21),
                  },
                 ],
                },
               ],
               position: (50, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (51, 7),
                },
               ],
              },
              With {
               expression: Variable {
                identifier: "pkgs",
                position: (51, 19),
               },
               target: List {
                elements: [
                 Variable {
                  identifier: "nix",
                  position: (51, 27),
                 },
                ],
                position: (51, 25),
               },
               position: (51, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "environment",
                 position: (52, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "HOME",
                    position: (53, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/empty",
                    position: (53, 17),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (52, 21),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (55, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (56, 9),
                   },
                  ],
                 },
                 BinaryOperation {
                  operator: Addition,
                  operands: [
                   String {
                    parts: [
                     Expression {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (56, 24),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "package",
                          position: (56, 28),
                         },
                        ],
                       },
                       default: None,
                      },
                     },
                     Raw {
                      content: "/bin/hail --profile ",
                      position: (56, 36),
                     },
                     Expression {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (56, 58),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "profile",
                          position: (56, 62),
                         },
                        ],
                       },
                       default: None,
                      },
                     },
                     Raw {
                      content: " --job-uri ",
                      position: (56, 70),
                     },
                     Expression {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (56, 83),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "hydraJobUri",
                          position: (56, 87),
                         },
                        ],
                       },
                       default: None,
                      },
                     },
                    ],
                   },
                   FunctionApplication {
                    function: PropertyAccess {
                     expression: Variable {
                      identifier: "lib",
                      position: (57, 13),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "optionalString",
                        position: (57, 17),
                       },
                      ],
                     },
                     default: None,
                    },
                    arguments: [
                     BinaryOperation {
                      operator: NotEqualTo,
                      operands: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (57, 33),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "netrc",
                           position: (57, 37),
                          },
                         ],
                        },
                        default: None,
                       },
                       Variable {
                        identifier: "null",
                        position: (57, 46),
                       },
                      ],
                      position: (57, 43),
                     },
                     String {
                      parts: [
                       Raw {
                        content: " --netrc-file ",
                        position: (57, 53),
                       },
                       Expression {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (57, 69),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "netrc",
                            position: (57, 73),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                      ],
                     },
                    ],
                   },
                  ],
                  position: (57, 11),
                 },
                ),
               ],
               recursive: false,
               position: (55, 23),
              },
             ),
            ],
            recursive: false,
            position: (47, 29),
           },
          ),
         ],
         recursive: false,
         position: (46, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (7, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}