---
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: "name",
        position: (6, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "roon-bridge",
        position: (6, 11),
       },
      ],
     },
    ),
    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: "roon-bridge",
         position: (7, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (9, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (10, 5),
           },
           Raw {
            content: "roon-bridge",
            position: (10, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (11, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (11, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "Roon Bridge",
                 position: (11, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "openFirewall",
               position: (12, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (12, 22),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (13, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (13, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (13, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (14, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (14, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (15, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Open ports in the firewall for the bridge.\n",
                    position: (16, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (12, 31),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (19, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (20, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (20, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (20, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "roon-bridge",
                    position: (21, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (22, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "User to run the Roon bridge as.\n",
                    position: (23, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (19, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "group",
               position: (26, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 15),
             },
             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: "str",
                     position: (27, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (28, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "roon-bridge",
                    position: (28, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (29, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Group to run the Roon Bridge as.\n",
                    position: (30, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 24),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (10, 28),
         },
        ),
       ],
       recursive: false,
       position: (9, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (36, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (36, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (36, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (36, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (37, 5),
             },
             Raw {
              content: "services",
              position: (37, 13),
             },
             Raw {
              content: "roon-bridge",
              position: (37, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (38, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (38, 18),
                  },
                 ],
                },
               ],
               position: (38, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (39, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Roon Bridge",
                 position: (39, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (40, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (40, 21),
                  },
                 ],
                },
               ],
               position: (40, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "environment",
                 position: (42, 7),
                },
                Raw {
                 content: "ROON_DATAROOT",
                 position: (42, 19),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/var/lib/",
                 position: (42, 36),
                },
                Expression {
                 expression: Variable {
                  identifier: "name",
                  position: (42, 47),
                 },
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (44, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (45, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (45, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "roon-bridge",
                        position: (45, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/start.sh",
                    position: (45, 41),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "LimitNOFILE",
                    position: (46, 9),
                   },
                  ],
                 },
                 Int {
                  value: 8192,
                  position: (46, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (47, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (47, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (47, 20),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (48, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (48, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (48, 21),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "StateDirectory",
                    position: (49, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "name",
                  position: (49, 26),
                 },
                ),
               ],
               recursive: false,
               position: (44, 23),
              },
             ),
            ],
            recursive: false,
            position: (37, 36),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "networking",
              position: (53, 5),
             },
             Raw {
              content: "firewall",
              position: (53, 16),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (53, 27),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (53, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "openFirewall",
                 position: (53, 36),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowedTCPPortRanges",
                   position: (54, 7),
                  },
                 ],
                },
                List {
                 elements: [
                  Map {
                   bindings: [
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "from",
                        position: (54, 33),
                       },
                      ],
                     },
                     Int {
                      value: 9100,
                      position: (54, 40),
                     },
                    ),
                    KeyValue(
                     AttributePath {
                      attributes: [
                       Raw {
                        content: "to",
                        position: (54, 46),
                       },
                      ],
                     },
                     Int {
                      value: 9200,
                      position: (54, 51),
                     },
                    ),
                   ],
                   recursive: false,
                   position: (54, 31),
                  },
                 ],
                 position: (54, 30),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowedUDPPorts",
                   position: (55, 7),
                  },
                 ],
                },
                List {
                 elements: [
                  Int {
                   value: 9003,
                   position: (55, 27),
                  },
                 ],
                 position: (55, 25),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "extraCommands",
                   position: (56, 7),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "iptables -A INPUT -s 224.0.0.0/4 -j ACCEPT\niptables -A INPUT -d 224.0.0.0/4 -j ACCEPT\niptables -A INPUT -s 240.0.0.0/5 -j ACCEPT\niptables -A INPUT -m pkttype --pkt-type multicast -j ACCEPT\niptables -A INPUT -m pkttype --pkt-type broadcast -j ACCEPT\n",
                   position: (57, 1),
                  },
                 ],
                },
               ),
              ],
              recursive: false,
              position: (53, 49),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (66, 5),
             },
             Raw {
              content: "groups",
              position: (66, 11),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (66, 20),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "group",
                  position: (66, 24),
                 },
                ],
               },
               default: None,
              },
             },
            ],
           },
           Map {
            bindings: [],
            recursive: false,
            position: (66, 33),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (67, 5),
             },
             Raw {
              content: "users",
              position: (67, 11),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (67, 19),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "user",
                  position: (67, 23),
                 },
                ],
               },
               default: None,
              },
             },
            ],
           },
           IfThenElse {
            predicate: BinaryOperation {
             operator: EqualTo,
             operands: [
              PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (68, 10),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "user",
                  position: (68, 14),
                 },
                ],
               },
               default: None,
              },
              String {
               parts: [
                Raw {
                 content: "roon-bridge",
                 position: (68, 23),
                },
               ],
              },
             ],
             position: (68, 19),
            },
            then: Map {
             bindings: [
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "isSystemUser",
                  position: (69, 9),
                 },
                ],
               },
               Variable {
                identifier: "true",
                position: (69, 24),
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "description",
                  position: (70, 9),
                 },
                ],
               },
               String {
                parts: [
                 Raw {
                  content: "Roon Bridge user",
                  position: (70, 24),
                 },
                ],
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "group",
                  position: (71, 9),
                 },
                ],
               },
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (71, 17),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "group",
                   position: (71, 21),
                  },
                 ],
                },
                default: None,
               },
              ),
              KeyValue(
               AttributePath {
                attributes: [
                 Raw {
                  content: "extraGroups",
                  position: (72, 9),
                 },
                ],
               },
               List {
                elements: [
                 String {
                  parts: [
                   Raw {
                    content: "audio",
                    position: (72, 26),
                   },
                  ],
                 },
                ],
                position: (72, 23),
               },
              ),
             ],
             recursive: false,
             position: (68, 41),
            },
            else_: Map {
             bindings: [],
             recursive: false,
             position: (74, 12),
            },
            position: (68, 7),
           },
          ),
         ],
         recursive: false,
         position: (36, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (8, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}