---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    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: "plikd",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "format",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (8, 12),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "formats",
          position: (8, 17),
         },
         Raw {
          content: "toml",
          position: (8, 25),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (8, 30),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "plikdCfg",
        position: (9, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "format",
        position: (9, 14),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "generate",
          position: (9, 21),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "plikd.cfg",
          position: (9, 31),
         },
        ],
       },
       PropertyAccess {
        expression: Variable {
         identifier: "cfg",
         position: (9, 42),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "settings",
           position: (9, 46),
          },
         ],
        },
        default: None,
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (12, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (13, 5),
           },
           Raw {
            content: "plikd",
            position: (13, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (14, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (14, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "the plikd server",
                 position: (14, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "openFirewall",
               position: (16, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (16, 22),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (17, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (17, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (17, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (18, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (18, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (19, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Open ports in the firewall for the plikd.",
                    position: (19, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (16, 31),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "settings",
               position: (22, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (22, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (23, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "format",
                   position: (23, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "type",
                     position: (23, 23),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (24, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [],
                  recursive: false,
                  position: (24, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (25, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Configuration for plikd, see <link xlink:href=\"https://github.com/root-gg/plik/blob/master/server/plikd.cfg\"/>\nfor supported values.\n",
                    position: (26, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (22, 27),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (13, 22),
         },
        ),
       ],
       recursive: false,
       position: (12, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (33, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (33, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (33, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (33, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (34, 5),
             },
             Raw {
              content: "plikd",
              position: (34, 14),
             },
             Raw {
              content: "settings",
              position: (34, 20),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mapAttrs",
             position: (34, 31),
            },
            arguments: [
             Function {
              argument: Some(
               "name",
              ),
              arguments: FunctionArguments {
               arguments: [],
               ellipsis: false,
              },
              definition: Variable {
               identifier: "mkDefault",
               position: (34, 47),
              },
              position: (34, 41),
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "ListenPort",
                   position: (35, 7),
                  },
                 ],
                },
                Int {
                 value: 8080,
                 position: (35, 20),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "ListenAddress",
                   position: (36, 7),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "localhost",
                   position: (36, 24),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "DataBackend",
                   position: (37, 7),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "file",
                   position: (37, 22),
                  },
                 ],
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "DataBackendConfig",
                   position: (38, 7),
                  },
                 ],
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "Directory",
                      position: (39, 10),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "/var/lib/plikd",
                      position: (39, 23),
                     },
                    ],
                   },
                  ),
                 ],
                 recursive: false,
                 position: (38, 27),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "MetadataBackendConfig",
                   position: (41, 7),
                  },
                 ],
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "Driver",
                      position: (42, 9),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "sqlite3",
                      position: (42, 19),
                     },
                    ],
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "ConnectionString",
                      position: (43, 9),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "/var/lib/plikd/plik.db",
                      position: (43, 29),
                     },
                    ],
                   },
                  ),
                 ],
                 recursive: false,
                 position: (41, 31),
                },
               ),
              ],
              recursive: false,
              position: (34, 58),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (47, 5),
             },
             Raw {
              content: "services",
              position: (47, 13),
             },
             Raw {
              content: "plikd",
              position: (47, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (48, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Plikd file sharing server",
                 position: (48, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (49, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (49, 18),
                  },
                 ],
                },
               ],
               position: (49, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (50, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (50, 21),
                  },
                 ],
                },
               ],
               position: (50, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (51, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (52, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "simple",
                    position: (52, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (53, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (53, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "plikd",
                        position: (53, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/plikd --config ",
                    position: (53, 35),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "plikdCfg",
                     position: (53, 57),
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (54, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (54, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "StateDirectory",
                    position: (55, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "plikd",
                    position: (55, 27),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "LogsDirectory",
                    position: (56, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "plikd",
                    position: (56, 26),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DynamicUser",
                    position: (57, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (57, 23),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "NoNewPrivileges",
                    position: (60, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (60, 28),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PrivateTmp",
                    position: (61, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (61, 23),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PrivateDevices",
                    position: (62, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (62, 27),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "DevicePolicy",
                    position: (63, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "closed",
                    position: (63, 25),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectSystem",
                    position: (64, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "strict",
                    position: (64, 26),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectHome",
                    position: (65, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "read-only",
                    position: (65, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectControlGroups",
                    position: (66, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (66, 33),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectKernelModules",
                    position: (67, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (67, 33),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ProtectKernelTunables",
                    position: (68, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (68, 34),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictAddressFamilies",
                    position: (69, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "AF_UNIX AF_INET AF_INET6 AF_NETLINK",
                    position: (69, 36),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictNamespaces",
                    position: (70, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (70, 31),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictRealtime",
                    position: (71, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (71, 29),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestrictSUIDSGID",
                    position: (72, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (72, 29),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "MemoryDenyWriteExecute",
                    position: (73, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (73, 35),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "LockPersonality",
                    position: (74, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "yes",
                    position: (74, 28),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (51, 23),
              },
             ),
            ],
            recursive: false,
            position: (47, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "networking",
              position: (78, 5),
             },
             Raw {
              content: "firewall",
              position: (78, 16),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (78, 27),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (78, 32),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "openFirewall",
                 position: (78, 36),
                },
               ],
              },
              default: None,
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowedTCPPorts",
                   position: (79, 7),
                  },
                 ],
                },
                List {
                 elements: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (79, 27),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "settings",
                      position: (79, 31),
                     },
                     Raw {
                      content: "ListenPort",
                      position: (79, 40),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                 position: (79, 25),
                },
               ),
              ],
              recursive: false,
              position: (78, 49),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (33, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (11, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}