---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (7, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (7, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (7, 16),
        },
        Raw {
         content: "xmr-stak",
         position: (7, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "pkg",
        position: (9, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (9, 9),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "xmr-stak",
          position: (9, 14),
         },
         Raw {
          content: "override",
          position: (9, 23),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [
         Inherit(
          Some(
           Variable {
            identifier: "cfg",
            position: (10, 14),
           },
          ),
          [
           Raw {
            content: "openclSupport",
            position: (10, 19),
           },
           Raw {
            content: "cudaSupport",
            position: (10, 33),
           },
          ],
         ),
        ],
        recursive: false,
        position: (9, 32),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (16, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (17, 5),
           },
           Raw {
            content: "xmr-stak",
            position: (17, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (18, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (18, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "xmr-stak miner",
                 position: (18, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "openclSupport",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (19, 23),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "support for OpenCL (AMD/ATI graphics cards)",
                 position: (19, 39),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "cudaSupport",
               position: (20, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (20, 21),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "support for CUDA (NVidia graphics cards)",
                 position: (20, 37),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "extraArgs",
               position: (22, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (22, 19),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (23, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (23, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "listOf",
                      position: (23, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (23, 29),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "str",
                       position: (23, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (24, 9),
                   },
                  ],
                 },
                 List {
                  elements: [],
                  position: (24, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (25, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "--noCPU",
                      position: (25, 22),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "--currency monero",
                      position: (25, 32),
                     },
                    ],
                   },
                  ],
                  position: (25, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (26, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "List of parameters to pass to xmr-stak.",
                    position: (26, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (22, 28),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "configFiles",
               position: (29, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (29, 21),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (30, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (30, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "attrsOf",
                      position: (30, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (30, 30),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "str",
                       position: (30, 36),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (31, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [],
                  recursive: false,
                  position: (31, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (32, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (32, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "{\n  \"config.txt\" = ",
                      position: (33, 1),
                     },
                     Raw {
                      content: "''",
                      position: (34, 28),
                     },
                     Raw {
                      content: "\n    \"verbose_level\" : 4,\n    \"h_print_time\" : 60,\n    \"tls_secure_algo\" : true,\n  ",
                      position: (34, 31),
                     },
                     Raw {
                      content: "''",
                      position: (38, 13),
                     },
                     Raw {
                      content: ";\n  \"pools.txt\" = ",
                      position: (38, 16),
                     },
                     Raw {
                      content: "''",
                      position: (39, 27),
                     },
                     Raw {
                      content: "\n    \"currency\" : \"monero7\",\n    \"pool_list\" :\n    [ { \"pool_address\" : \"pool.supportxmr.com:443\",\n        \"wallet_address\" : \"my-wallet-address\",\n        \"rig_id\" : \"\",\n        \"pool_password\" : \"nixos\",\n        \"use_nicehash\" : false,\n        \"use_tls\" : true,\n        \"tls_fingerprint\" : \"\",\n        \"pool_weight\" : 23\n      },\n    ],\n  ",
                      position: (39, 30),
                     },
                     Raw {
                      content: "''",
                      position: (52, 13),
                     },
                     Raw {
                      content: ";\n}\n",
                      position: (52, 16),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (55, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Content of config files like config.txt, pools.txt or cpu.txt.\n",
                    position: (56, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (29, 30),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (17, 25),
         },
        ),
       ],
       recursive: false,
       position: (16, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (62, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (62, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (62, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (62, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (63, 5),
             },
             Raw {
              content: "services",
              position: (63, 13),
             },
             Raw {
              content: "xmr-stak",
              position: (63, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (64, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (64, 21),
                  },
                 ],
                },
               ],
               position: (64, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "bindsTo",
                 position: (65, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network-online.target",
                   position: (65, 20),
                  },
                 ],
                },
               ],
               position: (65, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (66, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network-online.target",
                   position: (66, 18),
                  },
                 ],
                },
               ],
               position: (66, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "environment",
                 position: (67, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "mkIf",
                position: (67, 21),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (67, 26),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "cudaSupport",
                    position: (67, 30),
                   },
                  ],
                 },
                 default: None,
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "LD_LIBRARY_PATH",
                      position: (68, 9),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Expression {
                      expression: PropertyAccess {
                       expression: Variable {
                        identifier: "pkgs",
                        position: (68, 30),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "linuxPackages_latest",
                          position: (68, 35),
                         },
                         Raw {
                          content: "nvidia_x11",
                          position: (68, 56),
                         },
                        ],
                       },
                       default: None,
                      },
                     },
                     Raw {
                      content: "/lib",
                      position: (68, 67),
                     },
                    ],
                   },
                  ),
                 ],
                 recursive: false,
                 position: (67, 42),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "preStart",
                 position: (71, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "concatStrings",
                position: (71, 18),
               },
               arguments: [
                FunctionApplication {
                 function: Variable {
                  identifier: "flip",
                  position: (71, 33),
                 },
                 arguments: [
                  Variable {
                   identifier: "mapAttrsToList",
                   position: (71, 38),
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (71, 53),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "configFiles",
                      position: (71, 57),
                     },
                    ],
                   },
                   default: None,
                  },
                  Function {
                   argument: Some(
                    "fn",
                   ),
                   arguments: FunctionArguments {
                    arguments: [],
                    ellipsis: false,
                   },
                   definition: Function {
                    argument: Some(
                     "content",
                    ),
                    arguments: FunctionArguments {
                     arguments: [],
                     ellipsis: false,
                    },
                    definition: String {
                     parts: [
                      Raw {
                       content: "ln -sf ",
                       position: (72, 1),
                      },
                      Raw {
                       content: "'",
                       position: (72, 16),
                      },
                      Expression {
                       expression: FunctionApplication {
                        function: PropertyAccess {
                         expression: Variable {
                          identifier: "pkgs",
                          position: (72, 19),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "writeText",
                            position: (72, 24),
                           },
                          ],
                         },
                         default: None,
                        },
                        arguments: [
                         String {
                          parts: [
                           Raw {
                            content: "xmr-stak-",
                            position: (72, 35),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "fn",
                             position: (72, 46),
                            },
                           },
                          ],
                         },
                         Variable {
                          identifier: "content",
                          position: (72, 51),
                         },
                        ],
                       },
                      },
                      Raw {
                       content: "' ",
                       position: (72, 59),
                      },
                      Raw {
                       content: "'",
                       position: (72, 61),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "fn",
                        position: (72, 64),
                       },
                      },
                      Raw {
                       content: "'\n",
                       position: (72, 67),
                      },
                     ],
                    },
                    position: (71, 74),
                   },
                   position: (71, 70),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (75, 7),
                },
               ],
              },
              LetIn {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "rootRequired",
                    position: (75, 27),
                   },
                  ],
                 },
                 BinaryOperation {
                  operator: LogicalOr,
                  operands: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (75, 42),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "openclSupport",
                       position: (75, 46),
                      },
                     ],
                    },
                    default: None,
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (75, 63),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "cudaSupport",
                       position: (75, 67),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                  position: (75, 60),
                 },
                ),
               ],
               target: Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "ExecStart",
                     position: (76, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Expression {
                     expression: Variable {
                      identifier: "pkg",
                      position: (76, 24),
                     },
                    },
                    Raw {
                     content: "/bin/xmr-stak ",
                     position: (76, 28),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "concatStringsSep",
                       position: (76, 44),
                      },
                      arguments: [
                       String {
                        parts: [
                         Raw {
                          content: " ",
                          position: (76, 62),
                         },
                        ],
                       },
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (76, 65),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "extraArgs",
                           position: (76, 69),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "WorkingDirectory",
                     position: (78, 9),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "/tmp",
                     position: (78, 29),
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "PrivateTmp",
                     position: (79, 9),
                    },
                   ],
                  },
                  Variable {
                   identifier: "true",
                   position: (79, 22),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "DynamicUser",
                     position: (80, 9),
                    },
                   ],
                  },
                  UnaryOperation {
                   operator: Not,
                   operand: Variable {
                    identifier: "rootRequired",
                    position: (80, 24),
                   },
                   position: (80, 23),
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "LimitMEMLOCK",
                     position: (81, 9),
                    },
                   ],
                  },
                  FunctionApplication {
                   function: Variable {
                    identifier: "toString",
                    position: (81, 24),
                   },
                   arguments: [
                    BinaryOperation {
                     operator: Multiplication,
                     operands: [
                      Int {
                       value: 1024,
                       position: (81, 34),
                      },
                      Int {
                       value: 1024,
                       position: (81, 39),
                      },
                     ],
                     position: (81, 38),
                    },
                   ],
                  },
                 ),
                ],
                recursive: false,
                position: (75, 83),
               },
               position: (75, 23),
              },
             ),
            ],
            recursive: false,
            position: (63, 33),
           },
          ),
         ],
         recursive: false,
         position: (62, 28),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "imports",
         position: (86, 3),
        },
       ],
      },
      List {
       elements: [
        FunctionApplication {
         function: Variable {
          identifier: "mkRemovedOptionModule",
          position: (87, 6),
         },
         arguments: [
          List {
           elements: [
            String {
             parts: [
              Raw {
               content: "services",
               position: (87, 30),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "xmr-stak",
               position: (87, 41),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "configText",
               position: (87, 52),
              },
             ],
            },
           ],
           position: (87, 28),
          },
          String {
           parts: [
            Raw {
             content: "This option was removed in favour of `services.xmr-stak.configFiles`\nbecause the new config file `pools.txt` was introduced. You are\nnow able to define all other config files like cpu.txt or amd.txt.\n",
             position: (88, 1),
            },
           ],
          },
         ],
        },
       ],
       position: (86, 13),
      },
     ),
    ],
    recursive: false,
    position: (15, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}