---
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: (22, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (26, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (26, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (26, 16),
        },
        Raw {
         content: "firebird",
         position: (26, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "firebird",
        position: (28, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "cfg",
       position: (28, 14),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "package",
         position: (28, 18),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "dataDir",
        position: (30, 3),
       },
      ],
     },
     String {
      parts: [
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (30, 16),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "baseDir",
            position: (30, 20),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "/data",
        position: (30, 28),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "systemDir",
        position: (31, 3),
       },
      ],
     },
     String {
      parts: [
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (31, 18),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "baseDir",
            position: (31, 22),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "/system",
        position: (31, 30),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (39, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (41, 5),
           },
           Raw {
            content: "firebird",
            position: (41, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (43, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (43, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "the Firebird super server",
                 position: (43, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               position: (45, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (45, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (46, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (46, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "firebird",
                     position: (46, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (47, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (47, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.firebird",
                      position: (47, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (48, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (48, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "package",
                     position: (48, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (49, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (49, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.firebird_3",
                      position: (49, 38),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (50, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Which Firebird package to be installed: <code>pkgs.firebird_3</code>\nFor SuperServer use override: <code>pkgs.firebird_3.override { superServer = true; };</code>\n",
                    position: (51, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (45, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (56, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (56, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (57, 9),
                   },
                  ],
                 },
                 Int {
                  value: 3050,
                  position: (57, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (58, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (58, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "port",
                     position: (58, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (59, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Port Firebird uses.\n",
                    position: (60, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (56, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (64, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (64, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (65, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "firebird",
                    position: (65, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (66, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (66, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (66, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (67, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "User account under which firebird runs.\n",
                    position: (68, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (64, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "baseDir",
               position: (72, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (72, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (73, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/firebird",
                    position: (73, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (74, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (74, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (74, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (75, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Location containing data/ and system/ directories.\ndata/ stores the databases, system/ stores the password database security2.fdb.\n",
                    position: (76, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (72, 26),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (41, 25),
         },
        ),
       ],
       recursive: false,
       position: (39, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (88, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (88, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "config",
          position: (88, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (88, 24),
           },
           Raw {
            content: "firebird",
            position: (88, 33),
           },
           Raw {
            content: "enable",
            position: (88, 42),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (90, 5),
             },
             Raw {
              content: "systemPackages",
              position: (90, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (90, 35),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (90, 39),
                },
               ],
              },
              default: None,
             },
            ],
            position: (90, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (92, 5),
             },
             Raw {
              content: "tmpfiles",
              position: (92, 13),
             },
             Raw {
              content: "rules",
              position: (92, 22),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "d '",
                position: (93, 8),
               },
               Expression {
                expression: Variable {
                 identifier: "dataDir",
                 position: (93, 13),
                },
               },
               Raw {
                content: "' 0700 ",
                position: (93, 21),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (93, 30),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "user",
                    position: (93, 34),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " - - -",
                position: (93, 39),
               },
              ],
             },
             String {
              parts: [
               Raw {
                content: "d '",
                position: (94, 8),
               },
               Expression {
                expression: Variable {
                 identifier: "systemDir",
                 position: (94, 13),
                },
               },
               Raw {
                content: "' 0700 ",
                position: (94, 23),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (94, 32),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "user",
                    position: (94, 36),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " - - -",
                position: (94, 41),
               },
              ],
             },
            ],
            position: (92, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (97, 5),
             },
             Raw {
              content: "services",
              position: (97, 13),
             },
             Raw {
              content: "firebird",
              position: (97, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (98, 9),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Firebird Super-Server",
                 position: (98, 24),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (100, 9),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (100, 23),
                  },
                 ],
                },
               ],
               position: (100, 20),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "preStart",
                 position: (104, 9),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "if ! test -e \"",
                 position: (106, 1),
                },
                Expression {
                 expression: Variable {
                  identifier: "systemDir",
                  position: (106, 29),
                 },
                },
                Raw {
                 content: "/security2.fdb\"; then\n    cp ",
                 position: (106, 39),
                },
                Expression {
                 expression: Variable {
                  identifier: "firebird",
                  position: (107, 22),
                 },
                },
                Raw {
                 content: "/security2.fdb \"",
                 position: (107, 31),
                },
                Expression {
                 expression: Variable {
                  identifier: "systemDir",
                  position: (107, 49),
                 },
                },
                Raw {
                 content: "\"\nfi\n\nif ! test -e \"",
                 position: (107, 59),
                },
                Expression {
                 expression: Variable {
                  identifier: "systemDir",
                  position: (110, 29),
                 },
                },
                Raw {
                 content: "/security3.fdb\"; then\n    cp ",
                 position: (110, 39),
                },
                Expression {
                 expression: Variable {
                  identifier: "firebird",
                  position: (111, 22),
                 },
                },
                Raw {
                 content: "/security3.fdb \"",
                 position: (111, 31),
                },
                Expression {
                 expression: Variable {
                  identifier: "systemDir",
                  position: (111, 49),
                 },
                },
                Raw {
                 content: "\"\nfi\n\nif ! test -e \"",
                 position: (111, 59),
                },
                Expression {
                 expression: Variable {
                  identifier: "systemDir",
                  position: (114, 29),
                 },
                },
                Raw {
                 content: "/security4.fdb\"; then\n    cp ",
                 position: (114, 39),
                },
                Expression {
                 expression: Variable {
                  identifier: "firebird",
                  position: (115, 22),
                 },
                },
                Raw {
                 content: "/security4.fdb \"",
                 position: (115, 31),
                },
                Expression {
                 expression: Variable {
                  identifier: "systemDir",
                  position: (115, 49),
                 },
                },
                Raw {
                 content: "\"\nfi\n\nchmod -R 700         \"",
                 position: (115, 59),
                },
                Expression {
                 expression: Variable {
                  identifier: "dataDir",
                  position: (118, 37),
                 },
                },
                Raw {
                 content: "\" \"",
                 position: (118, 45),
                },
                Expression {
                 expression: Variable {
                  identifier: "systemDir",
                  position: (118, 50),
                 },
                },
                Raw {
                 content: "\" /var/log/firebird\n",
                 position: (118, 60),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (121, 9),
                },
                Raw {
                 content: "User",
                 position: (121, 23),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (121, 30),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "user",
                  position: (121, 34),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (122, 9),
                },
                Raw {
                 content: "LogsDirectory",
                 position: (122, 23),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "firebird",
                 position: (122, 40),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (123, 9),
                },
                Raw {
                 content: "LogsDirectoryMode",
                 position: (123, 23),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "0700",
                 position: (123, 44),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (124, 9),
                },
                Raw {
                 content: "ExecStart",
                 position: (124, 23),
                },
               ],
              },
              String {
               parts: [
                Expression {
                 expression: Variable {
                  identifier: "firebird",
                  position: (124, 38),
                 },
                },
                Raw {
                 content: "/bin/fbserver -d",
                 position: (124, 47),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (98, 7),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (129, 5),
             },
             Raw {
              content: "etc",
              position: (129, 17),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "firebird/firebird.msg",
                 position: (129, 22),
                },
               ],
              },
             },
             Raw {
              content: "source",
              position: (129, 45),
             },
            ],
           },
           String {
            parts: [
             Expression {
              expression: Variable {
               identifier: "firebird",
               position: (129, 57),
              },
             },
             Raw {
              content: "/firebird.msg",
              position: (129, 66),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (132, 5),
             },
             Raw {
              content: "etc",
              position: (132, 17),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "firebird/firebird.conf",
                 position: (132, 22),
                },
               ],
              },
             },
             Raw {
              content: "text",
              position: (132, 46),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "# RootDirectory = Restrict ",
              position: (133, 1),
             },
             Expression {
              expression: Variable {
               identifier: "dataDir",
               position: (133, 36),
              },
             },
             Raw {
              content: "\nDatabaseAccess = Restrict ",
              position: (133, 44),
             },
             Expression {
              expression: Variable {
               identifier: "dataDir",
               position: (134, 35),
              },
             },
             Raw {
              content: "\nExternalFileAccess = Restrict ",
              position: (134, 43),
             },
             Expression {
              expression: Variable {
               identifier: "dataDir",
               position: (135, 39),
              },
             },
             Raw {
              content: "\n# what is this? is None allowed?\nUdfAccess = None\n# \"Native\" =  traditional interbase/firebird, \"mixed\" is windows only\nAuthentication = Native\n\n# defaults to -1 on non Win32\n#MaxUnflushedWrites = 100\n#MaxUnflushedWriteTime = 100\n\n# show trace if trouble occurs (does this require debug build?)\n# BugcheckAbort = 0\n# ConnectionTimeout = 180\n\n#RemoteServiceName = gds_db\nRemoteServicePort = ",
              position: (135, 47),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (150, 29),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "port",
                  position: (150, 33),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "\n\n# randomly choose port for server Event Notification\n#RemoteAuxPort = 0\n# rsetrict connections to a network card:\n#RemoteBindAddress =\n# there are some additional settings which should be reviewed\n",
              position: (150, 38),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (159, 5),
             },
             Raw {
              content: "users",
              position: (159, 11),
             },
             Raw {
              content: "firebird",
              position: (159, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (160, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Firebird server user",
                 position: (160, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "group",
                 position: (161, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "firebird",
                 position: (161, 16),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "uid",
                 position: (162, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (162, 13),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "ids",
                  position: (162, 20),
                 },
                 Raw {
                  content: "uids",
                  position: (162, 24),
                 },
                 Raw {
                  content: "firebird",
                  position: (162, 29),
                 },
                ],
               },
               default: None,
              },
             ),
            ],
            recursive: false,
            position: (159, 28),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (165, 5),
             },
             Raw {
              content: "groups",
              position: (165, 11),
             },
             Raw {
              content: "firebird",
              position: (165, 18),
             },
             Raw {
              content: "gid",
              position: (165, 27),
             },
            ],
           },
           PropertyAccess {
            expression: Variable {
             identifier: "config",
             position: (165, 33),
            },
            attribute_path: AttributePath {
             attributes: [
              Raw {
               content: "ids",
               position: (165, 40),
              },
              Raw {
               content: "gids",
               position: (165, 44),
              },
              Raw {
               content: "firebird",
               position: (165, 49),
              },
             ],
            },
            default: None,
           },
          ),
         ],
         recursive: false,
         position: (88, 49),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (35, 1),
   },
   position: (24, 1),
  },
  position: (22, 1),
 },
 position: (1, 1),
}