---
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, 5),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 11),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 18),
        },
        Raw {
         content: "libreddit",
         position: (6, 27),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "args",
        position: (8, 5),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "concatStringsSep",
       position: (8, 12),
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: " ",
          position: (8, 30),
         },
        ],
       },
       BinaryOperation {
        operator: Concatenation,
        operands: [
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "--port ",
              position: (9, 8),
             },
             Expression {
              expression: FunctionApplication {
               function: Variable {
                identifier: "toString",
                position: (9, 17),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (9, 26),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "port",
                    position: (9, 30),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "--address ",
              position: (10, 8),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (10, 20),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "address",
                  position: (10, 24),
                 },
                ],
               },
               default: None,
              },
             },
            ],
           },
          ],
          position: (8, 34),
         },
         FunctionApplication {
          function: Variable {
           identifier: "optional",
           position: (11, 10),
          },
          arguments: [
           PropertyAccess {
            expression: Variable {
             identifier: "cfg",
             position: (11, 19),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "redirect",
               position: (11, 23),
              },
             ],
            },
            default: None,
           },
           String {
            parts: [
             Raw {
              content: "--redirect-https",
              position: (11, 33),
             },
            ],
           },
          ],
         },
        ],
        position: (11, 7),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (15, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (16, 5),
           },
           Raw {
            content: "libreddit",
            position: (16, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (17, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (17, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "Private front-end for Reddit",
                 position: (17, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "address",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (19, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (20, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "0.0.0.0",
                    position: (20, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "127.0.0.1",
                    position: (21, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (22, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (22, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (22, 23),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The address to listen on",
                    position: (23, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (19, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (26, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (26, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (27, 9),
                   },
                  ],
                 },
                 Int {
                  value: 8080,
                  position: (27, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (28, 9),
                   },
                  ],
                 },
                 Int {
                  value: 8000,
                  position: (28, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (29, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (29, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "port",
                     position: (29, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (30, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The port to listen on",
                    position: (30, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (26, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "redirect",
               position: (33, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (33, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (34, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (34, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (34, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (35, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (35, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (36, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Enable the redirecting to HTTPS",
                    position: (36, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (33, 27),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "openFirewall",
               position: (39, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (39, 22),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (40, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (40, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (40, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (41, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (41, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (42, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Open ports in the firewall for the libreddit web interface",
                    position: (42, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (39, 31),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (16, 26),
         },
        ),
       ],
       recursive: false,
       position: (15, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (48, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (48, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (48, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (48, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (49, 5),
             },
             Raw {
              content: "services",
              position: (49, 13),
             },
             Raw {
              content: "libreddit",
              position: (49, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (50, 9),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Private front-end for Reddit",
                 position: (50, 24),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (51, 9),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (51, 23),
                  },
                 ],
                },
               ],
               position: (51, 20),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (52, 9),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (52, 20),
                  },
                 ],
                },
               ],
               position: (52, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (53, 9),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (54, 11),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (54, 25),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (55, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (55, 26),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "libreddit",
                        position: (55, 31),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/libreddit ",
                    position: (55, 41),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "args",
                     position: (55, 58),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "AmbientCapabilities",
                    position: (56, 11),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "lib",
                    position: (56, 33),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "mkIf",
                      position: (56, 37),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   BinaryOperation {
                    operator: LessThan,
                    operands: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (56, 43),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "port",
                         position: (56, 47),
                        },
                       ],
                      },
                      default: None,
                     },
                     Int {
                      value: 1024,
                      position: (56, 54),
                     },
                    ],
                    position: (56, 52),
                   },
                   List {
                    elements: [
                     String {
                      parts: [
                       Raw {
                        content: "CAP_NET_BIND_SERVICE",
                        position: (56, 63),
                       },
                      ],
                     },
                    ],
                    position: (56, 60),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (57, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (57, 22),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestartSec",
                    position: (58, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "2s",
                    position: (58, 25),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (53, 25),
              },
             ),
            ],
            recursive: false,
            position: (49, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "networking",
              position: (62, 5),
             },
             Raw {
              content: "firewall",
              position: (62, 16),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (62, 27),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (62, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "openFirewall",
                 position: (62, 36),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowedTCPPorts",
                   position: (63, 7),
                  },
                 ],
                },
                List {
                 elements: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (63, 27),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "port",
                      position: (63, 31),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                 position: (63, 25),
                },
               ),
              ],
              recursive: false,
              position: (62, 49),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (48, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (14, 1),
   },
   position: (5, 3),
  },
  position: (3, 1),
 },
 position: (1, 1),
}