---
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: (5, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (5, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (5, 16),
        },
        Raw {
         content: "trezord",
         position: (5, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "doc",
            position: (11, 5),
           },
          ],
         },
         Path {
          parts: [
           Raw {
            content: "./trezord.xml",
            position: (11, 11),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 10),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (16, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (17, 5),
           },
           Raw {
            content: "trezord",
            position: (17, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (18, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (18, 16),
             },
             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: "bool",
                     position: (19, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (20, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (20, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Enable Trezor bridge daemon, for use with Trezor hardware bitcoin wallets.\n",
                    position: (22, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (18, 25),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "emulator",
               position: (26, 7),
              },
              Raw {
               content: "enable",
               position: (26, 16),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 25),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (27, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (27, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (27, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (28, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (28, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (29, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Enable Trezor emulator support.\n",
                    position: (30, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 34),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "emulator",
               position: (34, 7),
              },
              Raw {
               content: "port",
               position: (34, 16),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (34, 23),
             },
             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: "port",
                     position: (35, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (36, 9),
                   },
                  ],
                 },
                 Int {
                  value: 21324,
                  position: (36, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (37, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Listening port for the Trezor emulator.\n",
                    position: (38, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (34, 32),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (17, 24),
         },
        ),
       ],
       recursive: false,
       position: (16, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (46, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (46, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (46, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (46, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (47, 5),
             },
             Raw {
              content: "udev",
              position: (47, 14),
             },
             Raw {
              content: "packages",
              position: (47, 19),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (47, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "trezor-udev-rules",
                 position: (47, 37),
                },
               ],
              },
              default: None,
             },
            ],
            position: (47, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (49, 5),
             },
             Raw {
              content: "services",
              position: (49, 13),
             },
             Raw {
              content: "trezord",
              position: (49, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (50, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Trezor Bridge",
                 position: (50, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (51, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (51, 18),
                  },
                 ],
                },
               ],
               position: (51, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (52, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (52, 21),
                  },
                 ],
                },
               ],
               position: (52, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (53, 7),
                },
               ],
              },
              List {
               elements: [],
               position: (53, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (54, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (55, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "simple",
                    position: (55, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (56, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (56, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "trezord",
                        position: (56, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/trezord-go ",
                    position: (56, 37),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "optionalString",
                      position: (56, 55),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (56, 70),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "emulator",
                          position: (56, 74),
                         },
                         Raw {
                          content: "enable",
                          position: (56, 83),
                         },
                        ],
                       },
                       default: None,
                      },
                      String {
                       parts: [
                        Raw {
                         content: "-e ",
                         position: (56, 91),
                        },
                        Expression {
                         expression: FunctionApplication {
                          function: PropertyAccess {
                           expression: Variable {
                            identifier: "builtins",
                            position: (56, 96),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "toString",
                              position: (56, 105),
                             },
                            ],
                           },
                           default: None,
                          },
                          arguments: [
                           PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (56, 114),
                            },
                            attribute_path: AttributePath {
                             attributes: [
                              Raw {
                               content: "emulator",
                               position: (56, 118),
                              },
                              Raw {
                               content: "port",
                               position: (56, 127),
                              },
                             ],
                            },
                            default: None,
                           },
                          ],
                         },
                        },
                       ],
                      },
                     ],
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (57, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "trezord",
                    position: (57, 17),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (54, 23),
              },
             ),
            ],
            recursive: false,
            position: (49, 32),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (61, 5),
             },
             Raw {
              content: "users",
              position: (61, 11),
             },
             Raw {
              content: "trezord",
              position: (61, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "group",
                 position: (62, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "trezord",
                 position: (62, 16),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (63, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Trezor bridge daemon user",
                 position: (63, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "isSystemUser",
                 position: (64, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (64, 22),
              },
             ),
            ],
            recursive: false,
            position: (61, 27),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (67, 5),
             },
             Raw {
              content: "groups",
              position: (67, 11),
             },
             Raw {
              content: "trezord",
              position: (67, 18),
             },
            ],
           },
           Map {
            bindings: [],
            recursive: false,
            position: (67, 28),
           },
          ),
         ],
         recursive: false,
         position: (46, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (6, 4),
   },
   position: (4, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}