---
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: "rstudio-server",
         position: (7, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "rserver-conf",
        position: (9, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "builtins",
        position: (9, 18),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "toFile",
          position: (9, 27),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "rserver.conf",
          position: (9, 35),
         },
        ],
       },
       String {
        parts: [
         Raw {
          content: "server-working-dir=",
          position: (10, 1),
         },
         Expression {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (10, 26),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "serverWorkingDir",
              position: (10, 30),
             },
            ],
           },
           default: None,
          },
         },
         Raw {
          content: "\nwww-address=",
          position: (10, 47),
         },
         Expression {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (11, 19),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "listenAddr",
              position: (11, 23),
             },
            ],
           },
           default: None,
          },
         },
         Raw {
          content: "\n",
          position: (11, 34),
         },
         Expression {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (12, 7),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "rserverExtraConfig",
              position: (12, 11),
             },
            ],
           },
           default: None,
          },
         },
         Raw {
          content: "\n",
          position: (12, 30),
         },
        ],
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "rsession-conf",
        position: (15, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "builtins",
        position: (15, 19),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "toFile",
          position: (15, 28),
         },
        ],
       },
       default: None,
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "rsession.conf",
          position: (15, 36),
         },
        ],
       },
       String {
        parts: [
         Raw {
          content: "",
          position: (16, 1),
         },
         Expression {
          expression: PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (16, 7),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "rsessionExtraConfig",
              position: (16, 11),
             },
            ],
           },
           default: None,
          },
         },
         Raw {
          content: "\n",
          position: (16, 31),
         },
        ],
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (21, 3),
        },
        Raw {
         content: "maintainers",
         position: (21, 8),
        },
       ],
      },
      With {
       expression: Variable {
        identifier: "maintainers",
        position: (21, 27),
       },
       target: List {
        elements: [
         Variable {
          identifier: "jbedo",
          position: (21, 42),
         },
         Variable {
          identifier: "cfhammill",
          position: (21, 48),
         },
        ],
        position: (21, 40),
       },
       position: (21, 22),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (23, 3),
        },
        Raw {
         content: "services",
         position: (23, 11),
        },
        Raw {
         content: "rstudio-server",
         position: (23, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (24, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (24, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "RStudio server",
              position: (24, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "serverWorkingDir",
            position: (26, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (26, 24),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (27, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (27, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (27, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (28, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/var/lib/rstudio-server",
                 position: (28, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (29, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Default working directory for server (server-working-dir in rserver.conf).\n",
                 position: (30, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (26, 33),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "listenAddr",
            position: (34, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (34, 18),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (35, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (35, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (35, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (36, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "127.0.0.1",
                 position: (36, 18),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (37, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Address to listen on (www-address in rserver.conf).\n",
                 position: (38, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (34, 27),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "package",
            position: (42, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (42, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (43, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (43, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "package",
                  position: (43, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (44, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (44, 17),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "rstudio-server",
                  position: (44, 22),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (45, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (45, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.rstudio-server",
                   position: (45, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (46, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (46, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.rstudioServerWrapper.override { packages = [ pkgs.rPackages.ggplot2 ]; }",
                   position: (46, 36),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (47, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Rstudio server package to use. Can be set to rstudioServerWrapper to provide packages.\n",
                 position: (48, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (42, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "rserverExtraConfig",
            position: (52, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (52, 26),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (53, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (53, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (53, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (54, 7),
                },
               ],
              },
              String {
               parts: [],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (55, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Extra contents for rserver.conf.\n",
                 position: (56, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (52, 35),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "rsessionExtraConfig",
            position: (60, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (60, 27),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (61, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (61, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "str",
                  position: (61, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (62, 7),
                },
               ],
              },
              String {
               parts: [],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (63, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Extra contents for resssion.conf.\n",
                 position: (64, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (60, 36),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (23, 37),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (70, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (70, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (70, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (70, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (72, 7),
             },
             Raw {
              content: "services",
              position: (72, 15),
             },
             Raw {
              content: "rstudio-server",
              position: (72, 24),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (73, 9),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Rstudio server",
                 position: (73, 24),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (75, 9),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (75, 20),
                  },
                 ],
                },
               ],
               position: (75, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (76, 9),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (76, 23),
                  },
                 ],
                },
               ],
               position: (76, 20),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "restartTriggers",
                 position: (77, 9),
                },
               ],
              },
              List {
               elements: [
                Variable {
                 identifier: "rserver-conf",
                 position: (77, 29),
                },
                Variable {
                 identifier: "rsession-conf",
                 position: (77, 42),
                },
               ],
               position: (77, 27),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (79, 9),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (80, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (80, 22),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (81, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "forking",
                    position: (81, 19),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (82, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (82, 26),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (82, 30),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/rserver",
                    position: (82, 38),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "StateDirectory",
                    position: (83, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "rstudio-server",
                    position: (83, 29),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RuntimeDirectory",
                    position: (84, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "rstudio-server",
                    position: (84, 31),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (79, 25),
              },
             ),
            ],
            recursive: false,
            position: (72, 41),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (88, 7),
             },
             Raw {
              content: "etc",
              position: (88, 19),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Expression {
                 expression: String {
                  parts: [
                   Raw {
                    content: "rstudio/rserver.conf",
                    position: (89, 10),
                   },
                  ],
                 },
                },
                Raw {
                 content: "source",
                 position: (89, 32),
                },
               ],
              },
              Variable {
               identifier: "rserver-conf",
               position: (89, 41),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Expression {
                 expression: String {
                  parts: [
                   Raw {
                    content: "rstudio/rsession.conf",
                    position: (90, 10),
                   },
                  ],
                 },
                },
                Raw {
                 content: "source",
                 position: (90, 33),
                },
               ],
              },
              Variable {
               identifier: "rsession-conf",
               position: (90, 42),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Expression {
                 expression: String {
                  parts: [
                   Raw {
                    content: "pam.d/rstudio",
                    position: (91, 10),
                   },
                  ],
                 },
                },
                Raw {
                 content: "source",
                 position: (91, 25),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/etc/pam.d/login",
                 position: (91, 35),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (88, 25),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (93, 7),
             },
             Raw {
              content: "systemPackages",
              position: (93, 19),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (93, 38),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (93, 42),
                },
               ],
              },
              default: None,
             },
            ],
            position: (93, 36),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (95, 7),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "users",
                 position: (96, 9),
                },
                Raw {
                 content: "rstudio-server",
                 position: (96, 15),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "uid",
                    position: (97, 11),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "config",
                   position: (97, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "ids",
                     position: (97, 24),
                    },
                    Raw {
                     content: "uids",
                     position: (97, 28),
                    },
                    Raw {
                     content: "rstudio-server",
                     position: (97, 33),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (98, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "rstudio-server",
                    position: (98, 26),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "group",
                    position: (99, 11),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "rstudio-server",
                    position: (99, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (96, 32),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "groups",
                 position: (101, 9),
                },
                Raw {
                 content: "rstudio-server",
                 position: (101, 16),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "gid",
                    position: (102, 11),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "config",
                   position: (102, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "ids",
                     position: (102, 24),
                    },
                    Raw {
                     content: "gids",
                     position: (102, 28),
                    },
                    Raw {
                     content: "rstudio-server",
                     position: (102, 33),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (101, 33),
              },
             ),
            ],
            recursive: false,
            position: (95, 15),
           },
          ),
         ],
         recursive: false,
         position: (71, 5),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (20, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}