---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: LetIn {
  bindings: [
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "cfg",
       position: (5, 3),
      },
     ],
    },
    PropertyAccess {
     expression: Variable {
      identifier: "config",
      position: (5, 9),
     },
     attribute_path: AttributePath {
      attributes: [
       Raw {
        content: "services",
        position: (5, 16),
       },
       Raw {
        content: "xmrig",
        position: (5, 25),
       },
      ],
     },
     default: None,
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "json",
       position: (7, 3),
      },
     ],
    },
    FunctionApplication {
     function: PropertyAccess {
      expression: Variable {
       identifier: "pkgs",
       position: (7, 10),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "formats",
         position: (7, 15),
        },
        Raw {
         content: "json",
         position: (7, 23),
        },
       ],
      },
      default: None,
     },
     arguments: [
      Map {
       bindings: [],
       recursive: false,
       position: (7, 28),
      },
     ],
    },
   ),
   KeyValue(
    AttributePath {
     attributes: [
      Raw {
       content: "configFile",
       position: (8, 3),
      },
     ],
    },
    FunctionApplication {
     function: PropertyAccess {
      expression: Variable {
       identifier: "json",
       position: (8, 16),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "generate",
         position: (8, 21),
        },
       ],
      },
      default: None,
     },
     arguments: [
      String {
       parts: [
        Raw {
         content: "config.json",
         position: (8, 31),
        },
       ],
      },
      PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (8, 44),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "settings",
          position: (8, 48),
         },
        ],
       },
       default: None,
      },
     ],
    },
   ),
  ],
  target: With {
   expression: Variable {
    identifier: "lib",
    position: (11, 6),
   },
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (14, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (15, 5),
           },
           Raw {
            content: "xmrig",
            position: (15, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (16, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (16, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "XMRig Mining Software",
                 position: (16, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               position: (18, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (18, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (19, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (19, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "package",
                     position: (19, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (20, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (20, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "xmrig",
                     position: (20, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (21, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (21, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.xmrig",
                      position: (21, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (22, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (22, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.xmrig-mo",
                      position: (22, 38),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "XMRig package to use.",
                    position: (23, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (18, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "settings",
               position: (26, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (27, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [],
                  recursive: false,
                  position: (27, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (28, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "json",
                   position: (28, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (28, 21),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (29, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (29, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "{\n  autosave = true;\n  cpu = true;\n  opencl = false;\n  cuda = false;\n  pools = [\n    {\n      url = \"pool.supportxmr.com:443\";\n      user = \"your-wallet\";\n      keepalive = true;\n      tls = true;\n    }\n  ]\n}\n",
                      position: (30, 1),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (45, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "XMRig configuration. Refer to\n<link xlink:href=\"https://xmrig.com/docs/miner/config\"/>\nfor details on supported values.\n",
                    position: (46, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (15, 22),
         },
        ),
       ],
       recursive: false,
       position: (14, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (54, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (54, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (54, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (54, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (55, 5),
             },
             Raw {
              content: "kernelModules",
              position: (55, 10),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "msr",
                position: (55, 29),
               },
              ],
             },
            ],
            position: (55, 26),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (57, 5),
             },
             Raw {
              content: "services",
              position: (57, 13),
             },
             Raw {
              content: "xmrig",
              position: (57, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (58, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (58, 21),
                  },
                 ],
                },
               ],
               position: (58, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (59, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (59, 18),
                  },
                 ],
                },
               ],
               position: (59, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (60, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "XMRig Mining Software Service",
                 position: (60, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (61, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStartPre",
                    position: (62, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (62, 27),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (62, 31),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/xmrig --config=",
                    position: (62, 39),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "configFile",
                     position: (62, 61),
                    },
                   },
                   Raw {
                    content: " --dry-run",
                    position: (62, 72),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (63, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (63, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (63, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/xmrig --config=",
                    position: (63, 36),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "configFile",
                     position: (63, 58),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (68, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "lib",
                    position: (68, 23),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "mkDefault",
                      position: (68, 27),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   Variable {
                    identifier: "false",
                    position: (68, 37),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (61, 23),
              },
             ),
            ],
            recursive: false,
            position: (57, 30),
           },
          ),
         ],
         recursive: false,
         position: (54, 28),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (73, 3),
        },
       ],
      },
      With {
       expression: Variable {
        identifier: "lib",
        position: (73, 15),
       },
       target: Map {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "maintainers",
             position: (74, 5),
            },
           ],
          },
          With {
           expression: Variable {
            identifier: "maintainers",
            position: (74, 24),
           },
           target: List {
            elements: [
             Variable {
              identifier: "ratsclub",
              position: (74, 39),
             },
            ],
            position: (74, 37),
           },
           position: (74, 19),
          },
         ),
        ],
        recursive: false,
        position: (73, 20),
       },
       position: (73, 10),
      },
     ),
    ],
    recursive: false,
    position: (13, 1),
   },
   position: (11, 1),
  },
  position: (4, 1),
 },
 position: (1, 1),
}