---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "cpuminer-cryptonight",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "json",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "builtins",
        position: (8, 10),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "toJSON",
          position: (8, 19),
         },
        ],
       },
       default: None,
      },
      arguments: [
       BinaryOperation {
        operator: Update,
        operands: [
         Variable {
          identifier: "cfg",
          position: (9, 5),
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (10, 8),
              },
             ],
            },
            Variable {
             identifier: "null",
             position: (10, 17),
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "threads",
               position: (11, 8),
              },
             ],
            },
            IfThenElse {
             predicate: BinaryOperation {
              operator: EqualTo,
              operands: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (12, 13),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "threads",
                   position: (12, 17),
                  },
                 ],
                },
                default: None,
               },
               Int {
                value: 0,
                position: (12, 28),
               },
              ],
              position: (12, 25),
             },
             then: Variable {
              identifier: "null",
              position: (12, 35),
             },
             else_: FunctionApplication {
              function: Variable {
               identifier: "toString",
               position: (12, 45),
              },
              arguments: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (12, 54),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "threads",
                   position: (12, 58),
                  },
                 ],
                },
                default: None,
               },
              ],
             },
             position: (12, 10),
            },
           ),
          ],
          recursive: false,
          position: (9, 12),
         },
        ],
        position: (9, 9),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "confFile",
        position: (16, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "builtins",
        position: (16, 14),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "toFile",
          position: (16, 23),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "cpuminer.json",
          position: (16, 31),
         },
        ],
       },
       Variable {
        identifier: "json",
        position: (16, 46),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (20, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (22, 5),
           },
           Raw {
            content: "cpuminer-cryptonight",
            position: (22, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (23, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (23, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (24, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (24, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (24, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (25, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (25, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (26, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Whether to enable the cpuminer cryptonight miner.\n",
                    position: (27, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (23, 25),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "url",
               position: (30, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (30, 13),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (31, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (31, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (31, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (32, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "URL of mining server",
                    position: (32, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (30, 22),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (34, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (34, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (35, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (35, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (35, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (36, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Username for mining server",
                    position: (36, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (34, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "pass",
               position: (38, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (38, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (39, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (39, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (39, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (40, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "x",
                    position: (40, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (41, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Password for mining server",
                    position: (41, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (38, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "threads",
               position: (43, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (43, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (44, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (44, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (44, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (45, 9),
                   },
                  ],
                 },
                 Int {
                  value: 0,
                  position: (45, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (46, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Number of miner threads, defaults to available processors",
                    position: (46, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (43, 26),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (22, 37),
         },
        ),
       ],
       recursive: false,
       position: (20, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (52, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (52, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "config",
          position: (52, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (52, 24),
           },
           Raw {
            content: "cpuminer-cryptonight",
            position: (52, 33),
           },
           Raw {
            content: "enable",
            position: (52, 54),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (54, 5),
             },
             Raw {
              content: "services",
              position: (54, 13),
             },
             Raw {
              content: "cpuminer-cryptonight",
              position: (54, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (55, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Cryptonight cpuminer",
                 position: (55, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (56, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (56, 21),
                  },
                 ],
                },
               ],
               position: (56, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (57, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (57, 18),
                  },
                 ],
                },
               ],
               position: (57, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (58, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (59, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (59, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "cpuminer-multi",
                        position: (59, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/minerd --syslog --config=",
                    position: (59, 44),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "confFile",
                     position: (59, 76),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (60, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "nobody",
                    position: (60, 17),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (58, 23),
              },
             ),
            ],
            recursive: false,
            position: (54, 45),
           },
          ),
         ],
         recursive: false,
         position: (52, 61),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (18, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}