---
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: (7, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (7, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (7, 16),
        },
        Raw {
         content: "tiddlywiki",
         position: (7, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "listenParams",
        position: (8, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "concatStrings",
       position: (8, 18),
      },
      arguments: [
       FunctionApplication {
        function: Variable {
         identifier: "mapAttrsToList",
         position: (8, 33),
        },
        arguments: [
         Function {
          argument: Some(
           "n",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: Function {
           argument: Some(
            "v",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: String {
            parts: [
             Raw {
              content: " '",
              position: (8, 56),
             },
             Expression {
              expression: Variable {
               identifier: "n",
               position: (8, 60),
              },
             },
             Raw {
              content: "=",
              position: (8, 62),
             },
             Expression {
              expression: FunctionApplication {
               function: Variable {
                identifier: "toString",
                position: (8, 65),
               },
               arguments: [
                Variable {
                 identifier: "v",
                 position: (8, 74),
                },
               ],
              },
             },
             Raw {
              content: "' ",
              position: (8, 76),
             },
            ],
           },
           position: (8, 52),
          },
          position: (8, 49),
         },
         PropertyAccess {
          expression: Variable {
           identifier: "cfg",
           position: (8, 81),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "listenOptions",
             position: (8, 85),
            },
           ],
          },
          default: None,
         },
        ],
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "exe",
        position: (9, 3),
       },
      ],
     },
     String {
      parts: [
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (9, 12),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "nodePackages",
            position: (9, 17),
           },
           Raw {
            content: "tiddlywiki",
            position: (9, 30),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "/lib/node_modules/.bin/tiddlywiki",
        position: (9, 41),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "name",
        position: (10, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "tiddlywiki",
        position: (10, 11),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "dataDir",
        position: (11, 3),
       },
      ],
     },
     BinaryOperation {
      operator: Addition,
      operands: [
       String {
        parts: [
         Raw {
          content: "/var/lib/",
          position: (11, 14),
         },
        ],
       },
       Variable {
        identifier: "name",
        position: (11, 27),
       },
      ],
      position: (11, 25),
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (15, 3),
        },
        Raw {
         content: "services",
         position: (15, 11),
        },
        Raw {
         content: "tiddlywiki",
         position: (15, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (17, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (17, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "TiddlyWiki nodejs server",
              position: (17, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "listenOptions",
            position: (19, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (19, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (20, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (20, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "attrs",
                  position: (20, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (21, 7),
                },
               ],
              },
              Map {
               bindings: [],
               recursive: false,
               position: (21, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (22, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "credentials",
                    position: (23, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "../credentials.csv",
                    position: (23, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "readers",
                    position: (24, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "(authenticated)",
                    position: (24, 18),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "port",
                    position: (25, 9),
                   },
                  ],
                 },
                 Int {
                  value: 3456,
                  position: (25, 16),
                 },
                ),
               ],
               recursive: false,
               position: (22, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (27, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Parameters passed to <literal>--listen</literal> command.\nRefer to <link xlink:href=\"https://tiddlywiki.com/#WebServer\"/>\nfor details on supported values.\n",
                 position: (28, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (19, 30),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (15, 33),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (35, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (35, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (35, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (35, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (36, 5),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "services",
                 position: (37, 7),
                },
                Raw {
                 content: "tiddlywiki",
                 position: (37, 16),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "TiddlyWiki nodejs server",
                    position: (38, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "after",
                    position: (39, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "network.target",
                      position: (39, 20),
                     },
                    ],
                   },
                  ],
                  position: (39, 17),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "wantedBy",
                    position: (40, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "multi-user.target",
                      position: (40, 23),
                     },
                    ],
                   },
                  ],
                  position: (40, 20),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "serviceConfig",
                    position: (41, 9),
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "Type",
                       position: (42, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "simple",
                       position: (42, 19),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "Restart",
                       position: (43, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "on-failure",
                       position: (43, 22),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "DynamicUser",
                       position: (44, 11),
                      },
                     ],
                    },
                    Variable {
                     identifier: "true",
                     position: (44, 25),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "StateDirectory",
                       position: (45, 11),
                      },
                     ],
                    },
                    Variable {
                     identifier: "name",
                     position: (45, 28),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "ExecStartPre",
                       position: (46, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "-",
                       position: (46, 27),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "exe",
                        position: (46, 30),
                       },
                      },
                      Raw {
                       content: " ",
                       position: (46, 34),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "dataDir",
                        position: (46, 37),
                       },
                      },
                      Raw {
                       content: " --init server",
                       position: (46, 45),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "ExecStart",
                       position: (47, 11),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Expression {
                       expression: Variable {
                        identifier: "exe",
                        position: (47, 26),
                       },
                      },
                      Raw {
                       content: " ",
                       position: (47, 30),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "dataDir",
                        position: (47, 33),
                       },
                      },
                      Raw {
                       content: " --listen ",
                       position: (47, 41),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "listenParams",
                        position: (47, 53),
                       },
                      },
                     ],
                    },
                   ),
                  ],
                  recursive: false,
                  position: (41, 25),
                 },
                ),
               ],
               recursive: false,
               position: (37, 29),
              },
             ),
            ],
            recursive: false,
            position: (36, 15),
           },
          ),
         ],
         recursive: false,
         position: (35, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (13, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}