---
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: "tautulli",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "imports",
         position: (9, 3),
        },
       ],
      },
      List {
       elements: [
        FunctionApplication {
         function: Variable {
          identifier: "mkRenamedOptionModule",
          position: (10, 6),
         },
         arguments: [
          List {
           elements: [
            String {
             parts: [
              Raw {
               content: "services",
               position: (10, 31),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "plexpy",
               position: (10, 42),
              },
             ],
            },
           ],
           position: (10, 28),
          },
          List {
           elements: [
            String {
             parts: [
              Raw {
               content: "services",
               position: (10, 55),
              },
             ],
            },
            String {
             parts: [
              Raw {
               content: "tautulli",
               position: (10, 66),
              },
             ],
            },
           ],
           position: (10, 52),
          },
         ],
        },
       ],
       position: (9, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (13, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (14, 5),
           },
           Raw {
            content: "tautulli",
            position: (14, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (15, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (15, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "Tautulli Plex Monitor",
                 position: (15, 32),
                },
               ],
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "dataDir",
               position: (17, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (17, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (18, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (18, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (18, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (19, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/plexpy",
                    position: (19, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (20, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The directory where Tautulli stores its data files.",
                    position: (20, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (17, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "configFile",
               position: (23, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (23, 20),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (24, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (24, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (24, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (25, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/lib/plexpy/config.ini",
                    position: (25, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (26, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The location of Tautulli's config file.",
                    position: (26, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (23, 29),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "port",
               position: (29, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (29, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (30, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (30, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (30, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (31, 9),
                   },
                  ],
                 },
                 Int {
                  value: 8181,
                  position: (31, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (32, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "TCP port where Tautulli listens.",
                    position: (32, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (29, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "user",
               position: (35, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (35, 14),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (36, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (36, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (36, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (37, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "plexpy",
                    position: (37, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "User account under which Tautulli runs.",
                    position: (38, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (35, 23),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "group",
               position: (41, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (41, 15),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (42, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (42, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "str",
                     position: (42, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (43, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "nogroup",
                    position: (43, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (44, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Group under which Tautulli runs.",
                    position: (44, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (41, 24),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               position: (47, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (47, 17),
             },
             arguments: [
              Map {
               bindings: [
                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: "default",
                    position: (49, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (49, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "tautulli",
                     position: (49, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (50, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (50, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.tautulli",
                      position: (50, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (51, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "The Tautulli package to use.\n",
                    position: (52, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (47, 26),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (14, 25),
         },
        ),
       ],
       recursive: false,
       position: (13, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (58, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (58, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (58, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (58, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (59, 5),
             },
             Raw {
              content: "tmpfiles",
              position: (59, 13),
             },
             Raw {
              content: "rules",
              position: (59, 22),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "d '",
                position: (60, 8),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (60, 13),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "dataDir",
                    position: (60, 17),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "' - ",
                position: (60, 25),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (60, 31),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "user",
                    position: (60, 35),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " ",
                position: (60, 40),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (60, 43),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "group",
                    position: (60, 47),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: " - -",
                position: (60, 53),
               },
              ],
             },
            ],
            position: (59, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (63, 5),
             },
             Raw {
              content: "services",
              position: (63, 13),
             },
             Raw {
              content: "tautulli",
              position: (63, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (64, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Tautulli Plex Monitor",
                 position: (64, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (65, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (65, 18),
                  },
                 ],
                },
               ],
               position: (65, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (66, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (66, 21),
                  },
                 ],
                },
               ],
               position: (66, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (67, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (68, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "simple",
                    position: (68, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "User",
                    position: (69, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (69, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "user",
                     position: (69, 20),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Group",
                    position: (70, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "cfg",
                   position: (70, 17),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "group",
                     position: (70, 21),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "GuessMainPID",
                    position: (71, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "false",
                    position: (71, 25),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (72, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (72, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "package",
                        position: (72, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/tautulli --datadir ",
                    position: (72, 36),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (72, 62),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "dataDir",
                        position: (72, 66),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: " --config ",
                    position: (72, 74),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (72, 86),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "configFile",
                        position: (72, 90),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: " --port ",
                    position: (72, 101),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "toString",
                      position: (72, 111),
                     },
                     arguments: [
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (72, 120),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "port",
                          position: (72, 124),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                   Raw {
                    content: " --pidfile ",
                    position: (72, 129),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "cfg",
                      position: (72, 142),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "dataDir",
                        position: (72, 146),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/tautulli.pid --nolaunch",
                    position: (72, 154),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (73, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "on-failure",
                    position: (73, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (67, 23),
              },
             ),
            ],
            recursive: false,
            position: (63, 33),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (77, 5),
             },
             Raw {
              content: "users",
              position: (77, 11),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkIf",
             position: (77, 19),
            },
            arguments: [
             BinaryOperation {
              operator: EqualTo,
              operands: [
               PropertyAccess {
                expression: Variable {
                 identifier: "cfg",
                 position: (77, 25),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "user",
                   position: (77, 29),
                  },
                 ],
                },
                default: None,
               },
               String {
                parts: [
                 Raw {
                  content: "plexpy",
                  position: (77, 38),
                 },
                ],
               },
              ],
              position: (77, 34),
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "plexpy",
                   position: (78, 7),
                  },
                 ],
                },
                Map {
                 bindings: [
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "group",
                      position: (78, 18),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (78, 26),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "group",
                       position: (78, 30),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                  KeyValue(
                   AttributePath {
                    attributes: [
                     Raw {
                      content: "uid",
                      position: (78, 37),
                     },
                    ],
                   },
                   PropertyAccess {
                    expression: Variable {
                     identifier: "config",
                     position: (78, 43),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "ids",
                       position: (78, 50),
                      },
                      Raw {
                       content: "uids",
                       position: (78, 54),
                      },
                      Raw {
                       content: "plexpy",
                       position: (78, 59),
                      },
                     ],
                    },
                    default: None,
                   },
                  ),
                 ],
                 recursive: false,
                 position: (78, 16),
                },
               ),
              ],
              recursive: false,
              position: (77, 47),
             },
            ],
           },
          ),
         ],
         recursive: false,
         position: (58, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (8, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}