---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "options",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: LetIn {
  bindings: [
   Inherit(
    Some(
     Variable {
      identifier: "lib",
      position: (11, 12),
     },
    ),
    [
     Raw {
      content: "filterAttrs",
      position: (12, 5),
     },
     Raw {
      content: "literalDocBook",
      position: (13, 5),
     },
     Raw {
      content: "literalExpression",
      position: (14, 5),
     },
     Raw {
      content: "mkIf",
      position: (15, 5),
     },
     Raw {
      content: "mkOption",
      position: (16, 5),
     },
     Raw {
      content: "mkRemovedOptionModule",
      position: (17, 5),
     },
     Raw {
      content: "mkRenamedOptionModule",
      position: (18, 5),
     },
     Raw {
      content: "types",
      position: (19, 5),
     },
    ],
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "cfg",
       position: (22, 3),
      },
     ],
    },
    PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (23, 5),
     },
     attribute_path: AttributePath {
      attributes: [
       Raw {
        content: "services",
        position: (23, 12),
       },
       Raw {
        content: "hercules-ci-agent",
        position: (23, 21),
       },
      ],
     },
     default: None,
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "format",
       position: (25, 3),
      },
     ],
    },
    FunctionApplication {
     function: PropertyAccess {
      expression: Variable {
       identifier: "pkgs",
       position: (25, 12),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "formats",
         position: (25, 17),
        },
        Raw {
         content: "toml",
         position: (25, 25),
        },
       ],
      },
      default: None,
     },
     arguments: [
      Map {
       bindings: [],
       recursive: false,
       position: (25, 30),
      },
     ],
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "settingsModule",
       position: (27, 3),
      },
     ],
    },
    Function {
     argument: None,
     arguments: FunctionArguments {
      arguments: [
       FunctionArgument {
        identifier: "config",
        default: None,
       },
      ],
      ellipsis: true,
     },
     definition: Map {
      bindings: [
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "freeformType",
           position: (28, 5),
          },
         ],
        },
        PropertyAccess {
         expression: Variable {
          identifier: "format",
          position: (28, 20),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "type",
            position: (28, 27),
           },
          ],
         },
         default: None,
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "options",
           position: (29, 5),
          },
         ],
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "apiBaseUrl",
              position: (30, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (30, 20),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (31, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "API base URL that the agent will connect to.\n\nWhen using Hercules CI Enterprise, set this to the URL where your\nHercules CI server is reachable.\n",
                   position: (32, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (37, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (37, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (37, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (38, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "https://hercules-ci.com",
                   position: (38, 20),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (30, 29),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "baseDirectory",
              position: (40, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (40, 23),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (41, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (41, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (41, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (42, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "/var/lib/hercules-ci-agent",
                   position: (42, 20),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (43, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "State directory (secrets, work directory, etc) for agent\n",
                   position: (44, 1),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (40, 32),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "concurrentTasks",
              position: (47, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (47, 25),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (48, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "Number of tasks to perform simultaneously.\n\nA task is a single derivation build, an evaluation or an effect run.\nAt minimum, you need 2 concurrent tasks for <literal>x86_64-linux</literal>\nin your cluster, to allow for import from derivation.\n\n<literal>concurrentTasks</literal> can be around the CPU core count or lower if memory is\nthe bottleneck.\n\nThe optimal value depends on the resource consumption characteristics of your workload,\nincluding memory usage and in-task parallelism. This is typically determined empirically.\n\nWhen scaling, it is generally better to have a double-size machine than two machines,\nbecause each split of resources causes inefficiencies; particularly with regards\nto build latency because of extra downloads.\n",
                   position: (49, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (65, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (65, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "either",
                     position: (65, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (65, 29),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "ints",
                      position: (65, 35),
                     },
                     Raw {
                      content: "positive",
                      position: (65, 40),
                     },
                    ],
                   },
                   default: None,
                  },
                  FunctionApplication {
                   function: PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (65, 50),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "enum",
                       position: (65, 56),
                      },
                     ],
                    },
                    default: None,
                   },
                   arguments: [
                    List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "auto",
                         position: (65, 64),
                        },
                       ],
                      },
                     ],
                     position: (65, 61),
                    },
                   ],
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (66, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "auto",
                   position: (66, 20),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (47, 34),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "labels",
              position: (68, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (68, 16),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (69, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "A key-value map of user data.\n\nThis data will be available to organization members in the dashboard and API.\n\nThe values can be of any TOML type that corresponds to a JSON type, but arrays\ncan not contain tables/objects due to limitations of the TOML library. Values\ninvolving arrays of non-primitive types may not be representable currently.\n",
                   position: (70, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (78, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "format",
                  position: (78, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (78, 23),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "defaultText",
                   position: (79, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "literalExpression",
                  position: (79, 23),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: "{\n  agent.source = \"...\"; # One of \"nixpkgs\", \"flake\", \"override\"\n  lib.version = \"...\";\n  pkgs.version = \"...\";\n}\n",
                     position: (80, 1),
                    },
                   ],
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (68, 25),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "workDirectory",
              position: (87, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (87, 23),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (88, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "The directory in which temporary subdirectories are created for task state. This includes sources for Nix evaluation.\n",
                   position: (89, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (91, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (91, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (91, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (92, 9),
                  },
                 ],
                },
                BinaryOperation {
                 operator: Addition,
                 operands: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "config",
                    position: (92, 19),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "baseDirectory",
                      position: (92, 26),
                     },
                    ],
                   },
                   default: None,
                  },
                  String {
                   parts: [
                    Raw {
                     content: "/work",
                     position: (92, 43),
                    },
                   ],
                  },
                 ],
                 position: (92, 40),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "defaultText",
                   position: (93, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "literalExpression",
                  position: (93, 23),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: "baseDirectory + \"/work\"",
                     position: (93, 43),
                    },
                   ],
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (87, 32),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "staticSecretsDirectory",
              position: (95, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (95, 32),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (96, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "This is the default directory to look for statically configured secrets like <literal>cluster-join-token.key</literal>.\n\nSee also <literal>clusterJoinTokenPath</literal> and <literal>binaryCachesPath</literal> for fine-grained configuration.\n",
                   position: (97, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (101, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (101, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (101, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (102, 9),
                  },
                 ],
                },
                BinaryOperation {
                 operator: Addition,
                 operands: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "config",
                    position: (102, 19),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "baseDirectory",
                      position: (102, 26),
                     },
                    ],
                   },
                   default: None,
                  },
                  String {
                   parts: [
                    Raw {
                     content: "/secrets",
                     position: (102, 43),
                    },
                   ],
                  },
                 ],
                 position: (102, 40),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "defaultText",
                   position: (103, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "literalExpression",
                  position: (103, 23),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: "baseDirectory + \"/secrets\"",
                     position: (103, 43),
                    },
                   ],
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (95, 41),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "clusterJoinTokenPath",
              position: (105, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (105, 30),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (106, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "Location of the cluster-join-token.key file.\n\nYou can retrieve the contents of the file when creating a new agent via\n<link xlink:href=\"https://hercules-ci.com/dashboard\">https://hercules-ci.com/dashboard</link>.\n\nAs this value is confidential, it should not be in the store, but\ninstalled using other means, such as agenix, NixOps\n<literal>deployment.keys</literal>, or manual installation.\n\nThe contents of the file are used for authentication between the agent and the API.\n",
                   position: (107, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (118, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (118, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (118, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (119, 9),
                  },
                 ],
                },
                BinaryOperation {
                 operator: Addition,
                 operands: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "config",
                    position: (119, 19),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "staticSecretsDirectory",
                      position: (119, 26),
                     },
                    ],
                   },
                   default: None,
                  },
                  String {
                   parts: [
                    Raw {
                     content: "/cluster-join-token.key",
                     position: (119, 52),
                    },
                   ],
                  },
                 ],
                 position: (119, 49),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "defaultText",
                   position: (120, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "literalExpression",
                  position: (120, 23),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: "staticSecretsDirectory + \"/cluster-join-token.key\"",
                     position: (120, 43),
                    },
                   ],
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (105, 39),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "binaryCachesPath",
              position: (122, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (122, 26),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (123, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "Path to a JSON file containing binary cache secret keys.\n\nAs these values are confidential, they should not be in the store, but\ncopied over using other means, such as agenix, NixOps\n<literal>deployment.keys</literal>, or manual installation.\n\nThe format is described on <link xlink:href=\"https://docs.hercules-ci.com/hercules-ci-agent/binary-caches-json/\">https://docs.hercules-ci.com/hercules-ci-agent/binary-caches-json/</link>.\n",
                   position: (124, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (132, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (132, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (132, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (133, 9),
                  },
                 ],
                },
                BinaryOperation {
                 operator: Addition,
                 operands: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "config",
                    position: (133, 19),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "staticSecretsDirectory",
                      position: (133, 26),
                     },
                    ],
                   },
                   default: None,
                  },
                  String {
                   parts: [
                    Raw {
                     content: "/binary-caches.json",
                     position: (133, 52),
                    },
                   ],
                  },
                 ],
                 position: (133, 49),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "defaultText",
                   position: (134, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "literalExpression",
                  position: (134, 23),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: "staticSecretsDirectory + \"/binary-caches.json\"",
                     position: (134, 43),
                    },
                   ],
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (122, 35),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "secretsJsonPath",
              position: (136, 7),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkOption",
             position: (136, 25),
            },
            arguments: [
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "description",
                   position: (137, 9),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "Path to a JSON file containing secrets for effects.\n\nAs these values are confidential, they should not be in the store, but\ncopied over using other means, such as agenix, NixOps\n<literal>deployment.keys</literal>, or manual installation.\n\nThe format is described on <link xlink:href=\"https://docs.hercules-ci.com/hercules-ci-agent/secrets-json/\">https://docs.hercules-ci.com/hercules-ci-agent/secrets-json/</link>.\n\n",
                   position: (138, 1),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "type",
                   position: (147, 9),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (147, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (147, 22),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "default",
                   position: (148, 9),
                  },
                 ],
                },
                BinaryOperation {
                 operator: Addition,
                 operands: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "config",
                    position: (148, 19),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "staticSecretsDirectory",
                      position: (148, 26),
                     },
                    ],
                   },
                   default: None,
                  },
                  String {
                   parts: [
                    Raw {
                     content: "/secrets.json",
                     position: (148, 52),
                    },
                   ],
                  },
                 ],
                 position: (148, 49),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "defaultText",
                   position: (149, 9),
                  },
                 ],
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "literalExpression",
                  position: (149, 23),
                 },
                 arguments: [
                  String {
                   parts: [
                    Raw {
                     content: "staticSecretsDirectory + \"/secrets.json\"",
                     position: (149, 43),
                    },
                   ],
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (136, 34),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (29, 15),
        },
       ),
      ],
      recursive: false,
      position: (27, 37),
     },
     position: (27, 20),
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "checkNix",
       position: (155, 3),
      },
     ],
    },
    IfThenElse {
     predicate: UnaryOperation {
      operator: Not,
      operand: PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (156, 9),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "checkNix",
          position: (156, 13),
         },
        ],
       },
       default: None,
      },
      position: (156, 8),
     },
     then: String {
      parts: [],
     },
     else_: IfThenElse {
      predicate: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (158, 13),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "versionAtLeast",
           position: (158, 17),
          },
         ],
        },
        default: None,
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "config",
          position: (158, 32),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "nix",
            position: (158, 39),
           },
           Raw {
            content: "package",
            position: (158, 43),
           },
           Raw {
            content: "version",
            position: (158, 51),
           },
          ],
         },
         default: None,
        },
        String {
         parts: [
          Raw {
           content: "2.3.10",
           position: (158, 60),
          },
         ],
        },
       ],
      },
      then: String {
       parts: [],
      },
      else_: FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "pkgs",
         position: (161, 7),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "stdenv",
           position: (161, 12),
          },
          Raw {
           content: "mkDerivation",
           position: (161, 19),
          },
         ],
        },
        default: None,
       },
       arguments: [
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "name",
              position: (162, 9),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-check-system-nix-src",
              position: (162, 17),
             },
            ],
           },
          ),
          Inherit(
           Some(
            PropertyAccess {
             expression: Variable {
              identifier: "config",
              position: (163, 18),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "nix",
                position: (163, 25),
               },
               Raw {
                content: "package",
                position: (163, 29),
               },
              ],
             },
             default: None,
            },
           ),
           [
            Raw {
             content: "src",
             position: (163, 38),
            },
            Raw {
             content: "patches",
             position: (163, 42),
            },
           ],
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "dontConfigure",
              position: (164, 9),
             },
            ],
           },
           Variable {
            identifier: "true",
            position: (164, 25),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "buildPhase",
              position: (165, 9),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "echo \"Checking in-memory pathInfoCache expiry\"\nif ! grep 'PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then\n  cat 1>&2 <<EOF\n\n  You are deploying Hercules CI Agent on a system with an incompatible\n  nix-daemon. Please make sure nix.package is set to a Nix version of at\n  least 2.3.10 or a master version more recent than Mar 12, 2020.\nEOF\n  exit 1\nfi\n",
              position: (166, 1),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "installPhase",
              position: (177, 9),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "touch $out",
              position: (177, 25),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (161, 32),
        },
       ],
      },
      position: (158, 10),
     },
     position: (156, 5),
    },
   ),
  ],
  target: Map {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "imports",
        position: (182, 3),
       },
      ],
     },
     List {
      elements: [
       FunctionApplication {
        function: Variable {
         identifier: "mkRenamedOptionModule",
         position: (183, 6),
        },
        arguments: [
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "services",
              position: (183, 31),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-agent",
              position: (183, 42),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "extraOptions",
              position: (183, 62),
             },
            ],
           },
          ],
          position: (183, 28),
         },
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "services",
              position: (183, 81),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-agent",
              position: (183, 92),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "settings",
              position: (183, 112),
             },
            ],
           },
          ],
          position: (183, 78),
         },
        ],
       },
       FunctionApplication {
        function: Variable {
         identifier: "mkRenamedOptionModule",
         position: (184, 6),
        },
        arguments: [
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "services",
              position: (184, 31),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-agent",
              position: (184, 42),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "baseDirectory",
              position: (184, 62),
             },
            ],
           },
          ],
          position: (184, 28),
         },
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "services",
              position: (184, 82),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-agent",
              position: (184, 93),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "settings",
              position: (184, 113),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "baseDirectory",
              position: (184, 124),
             },
            ],
           },
          ],
          position: (184, 79),
         },
        ],
       },
       FunctionApplication {
        function: Variable {
         identifier: "mkRenamedOptionModule",
         position: (185, 6),
        },
        arguments: [
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "services",
              position: (185, 31),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-agent",
              position: (185, 42),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "concurrentTasks",
              position: (185, 62),
             },
            ],
           },
          ],
          position: (185, 28),
         },
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "services",
              position: (185, 84),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-agent",
              position: (185, 95),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "settings",
              position: (185, 115),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "concurrentTasks",
              position: (185, 126),
             },
            ],
           },
          ],
          position: (185, 81),
         },
        ],
       },
       FunctionApplication {
        function: Variable {
         identifier: "mkRemovedOptionModule",
         position: (186, 6),
        },
        arguments: [
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "services",
              position: (186, 31),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "hercules-ci-agent",
              position: (186, 42),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "patchNix",
              position: (186, 62),
             },
            ],
           },
          ],
          position: (186, 28),
         },
         String {
          parts: [
           Raw {
            content: "Nix versions packaged in this version of Nixpkgs don't need a patched nix-daemon to work correctly in Hercules CI Agent clusters.",
            position: (186, 75),
           },
          ],
         },
        ],
       },
      ],
      position: (182, 13),
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "options",
        position: (189, 3),
       },
       Raw {
        content: "services",
        position: (189, 11),
       },
       Raw {
        content: "hercules-ci-agent",
        position: (189, 20),
       },
      ],
     },
     Map {
      bindings: [
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "enable",
           position: (190, 5),
          },
         ],
        },
        FunctionApplication {
         function: Variable {
          identifier: "mkOption",
          position: (190, 14),
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (191, 7),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "types",
               position: (191, 14),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "bool",
                 position: (191, 20),
                },
               ],
              },
              default: None,
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (192, 7),
               },
              ],
             },
             Variable {
              identifier: "false",
              position: (192, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (193, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "Enable to run Hercules CI Agent as a system service.\n\n<link xlink:href=\"https://hercules-ci.com\">Hercules CI</link> is a\ncontinuous integation service that is centered around Nix.\n\nSupport is available at <link xlink:href=\"mailto:help@hercules-ci.com\">help@hercules-ci.com</link>.\n",
                position: (194, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (190, 23),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "checkNix",
           position: (202, 5),
          },
         ],
        },
        FunctionApplication {
         function: Variable {
          identifier: "mkOption",
          position: (202, 16),
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (203, 7),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "types",
               position: (203, 14),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "bool",
                 position: (203, 20),
                },
               ],
              },
              default: None,
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (204, 7),
               },
              ],
             },
             Variable {
              identifier: "true",
              position: (204, 17),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (205, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "Whether to make sure that the system's Nix (nix-daemon) is compatible.\n\nIf you set this to false, please keep up with the change log.\n",
                position: (206, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (202, 25),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "package",
           position: (211, 5),
          },
         ],
        },
        FunctionApplication {
         function: Variable {
          identifier: "mkOption",
          position: (211, 15),
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (212, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "Package containing the bin/hercules-ci-agent executable.\n",
                position: (213, 1),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (215, 7),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "types",
               position: (215, 14),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (215, 20),
                },
               ],
              },
              default: None,
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "default",
                position: (216, 7),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (216, 17),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "hercules-ci-agent",
                 position: (216, 22),
                },
               ],
              },
              default: None,
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "defaultText",
                position: (217, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "literalExpression",
               position: (217, 21),
              },
              arguments: [
               String {
                parts: [
                 Raw {
                  content: "pkgs.hercules-ci-agent",
                  position: (217, 40),
                 },
                ],
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (211, 24),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "settings",
           position: (219, 5),
          },
         ],
        },
        FunctionApplication {
         function: Variable {
          identifier: "mkOption",
          position: (219, 16),
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (220, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "These settings are written to the <literal>agent.toml</literal> file.\n\nNot all settings are listed as options, can be set nonetheless.\n\nFor the exhaustive list of settings, see <link xlink:href=\"https://docs.hercules-ci.com/hercules-ci/reference/agent-config/\"/>.\n",
                position: (221, 1),
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (227, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (227, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "submoduleWith",
                  position: (227, 20),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "modules",
                     position: (227, 36),
                    },
                   ],
                  },
                  List {
                   elements: [
                    Variable {
                     identifier: "settingsModule",
                     position: (227, 48),
                    },
                   ],
                   position: (227, 46),
                  },
                 ),
                ],
                recursive: false,
                position: (227, 34),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (219, 25),
          },
         ],
        },
       ),
       KeyValue(
        AttributePath {
         attributes: [
          Raw {
           content: "tomlFile",
           position: (236, 5),
          },
         ],
        },
        FunctionApplication {
         function: Variable {
          identifier: "mkOption",
          position: (236, 16),
         },
         arguments: [
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "type",
                position: (237, 7),
               },
              ],
             },
             PropertyAccess {
              expression: Variable {
               identifier: "types",
               position: (237, 14),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (237, 20),
                },
               ],
              },
              default: None,
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "internal",
                position: (238, 7),
               },
              ],
             },
             Variable {
              identifier: "true",
              position: (238, 18),
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "defaultText",
                position: (239, 7),
               },
              ],
             },
             FunctionApplication {
              function: Variable {
               identifier: "literalDocBook",
               position: (239, 21),
              },
              arguments: [
               String {
                parts: [
                 Raw {
                  content: "generated <literal>hercules-ci-agent.toml</literal>",
                  position: (239, 37),
                 },
                ],
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "description",
                position: (240, 7),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "The fully assembled config file.\n",
                position: (241, 1),
               },
              ],
             },
            ),
           ],
           recursive: false,
           position: (236, 25),
          },
         ],
        },
       ),
      ],
      recursive: false,
      position: (189, 40),
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "config",
        position: (246, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "mkIf",
       position: (246, 12),
      },
      arguments: [
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (246, 17),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "enable",
           position: (246, 21),
          },
         ],
        },
        default: None,
       },
       Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "nix",
             position: (247, 5),
            },
            Raw {
             content: "extraOptions",
             position: (247, 9),
            },
           ],
          },
          FunctionApplication {
           function: PropertyAccess {
            expression: Variable {
             identifier: "lib",
             position: (247, 24),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "addContextFrom",
               position: (247, 28),
              },
             ],
            },
            default: None,
           },
           arguments: [
            Variable {
             identifier: "checkNix",
             position: (247, 43),
            },
            String {
             parts: [
              Raw {
               content: "# A store path that was missing at first may well have finished building,\n# even shortly after the previous lookup. This *also* applies to the daemon.\nnarinfo-cache-negative-ttl = 0\n",
               position: (248, 1),
              },
             ],
            },
           ],
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "services",
             position: (252, 5),
            },
            Raw {
             content: "hercules-ci-agent",
             position: (252, 14),
            },
           ],
          },
          Map {
           bindings: [
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "tomlFile",
                position: (253, 7),
               },
              ],
             },
             FunctionApplication {
              function: PropertyAccess {
               expression: Variable {
                identifier: "format",
                position: (254, 9),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "generate",
                  position: (254, 16),
                 },
                ],
               },
               default: None,
              },
              arguments: [
               String {
                parts: [
                 Raw {
                  content: "hercules-ci-agent.toml",
                  position: (254, 26),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (254, 50),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "settings",
                   position: (254, 54),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
            ),
            KeyValue(
             AttributePath {
              attributes: [
               Raw {
                content: "settings",
                position: (256, 7),
               },
               Raw {
                content: "labels",
                position: (256, 16),
               },
              ],
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "agent",
                   position: (257, 9),
                  },
                  Raw {
                   content: "source",
                   position: (257, 15),
                  },
                 ],
                },
                IfThenElse {
                 predicate: BinaryOperation {
                  operator: EqualTo,
                  operands: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "options",
                     position: (258, 14),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "services",
                       position: (258, 22),
                      },
                      Raw {
                       content: "hercules-ci-agent",
                       position: (258, 31),
                      },
                      Raw {
                       content: "package",
                       position: (258, 49),
                      },
                      Raw {
                       content: "highestPrio",
                       position: (258, 57),
                      },
                     ],
                    },
                    default: None,
                   },
                   PropertyAccess {
                    expression: FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "lib",
                       position: (258, 73),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "modules",
                         position: (258, 77),
                        },
                        Raw {
                         content: "mkOptionDefault",
                         position: (258, 85),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      Map {
                       bindings: [],
                       recursive: false,
                       position: (258, 101),
                      },
                     ],
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "priority",
                       position: (258, 106),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                  position: (258, 69),
                 },
                 then: String {
                  parts: [
                   Raw {
                    content: "nixpkgs",
                    position: (259, 17),
                   },
                  ],
                 },
                 else_: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "lib",
                    position: (260, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "mkOptionDefault",
                      position: (260, 20),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "override",
                      position: (260, 37),
                     },
                    ],
                   },
                  ],
                 },
                 position: (258, 11),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "pkgs",
                   position: (261, 9),
                  },
                  Raw {
                   content: "version",
                   position: (261, 14),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (261, 24),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "lib",
                    position: (261, 29),
                   },
                   Raw {
                    content: "version",
                    position: (261, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "lib",
                   position: (262, 9),
                  },
                  Raw {
                   content: "version",
                   position: (262, 13),
                  },
                 ],
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "lib",
                  position: (262, 23),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "version",
                    position: (262, 27),
                   },
                  ],
                 },
                 default: None,
                },
               ),
              ],
              recursive: false,
              position: (256, 25),
             },
            ),
           ],
           recursive: false,
           position: (252, 34),
          },
         ),
        ],
        recursive: false,
        position: (246, 28),
       },
      ],
     },
    ),
   ],
   recursive: false,
   position: (181, 1),
  },
  position: (10, 1),
 },
 position: (9, 1),
}