---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "vdr",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "libDir",
        position: (7, 3),
       },
      ],
     },
     to: String {
      parts: [
       Raw {
        content: "/var/lib/vdr",
        position: (7, 13),
       },
      ],
      position: (7, 12),
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (12, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "services",
            position: (14, 5),
           },
           Raw {
            content: "vdr",
            position: (14, 14),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "enable",
               position: (15, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (15, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "VDR. Please put config into ",
                 position: (15, 32),
                },
                Interpolation {
                 expression: Variable {
                  identifier: "libDir",
                  position: (15, 62),
                 },
                },
               ],
               position: (15, 31),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "package",
               position: (17, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (17, 17),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (18, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (18, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "package",
                     position: (18, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (19, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (19, 19),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "vdr",
                     position: (19, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "defaultText",
                    position: (20, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (20, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.vdr",
                      position: (20, 42),
                     },
                    ],
                    position: (20, 41),
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (21, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (21, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.wrapVdr.override { plugins = with pkgs.vdrPlugins; [ hello ]; }",
                      position: (21, 38),
                     },
                    ],
                    position: (21, 37),
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (22, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Package to use.",
                    position: (22, 24),
                   },
                  ],
                  position: (22, 23),
                 },
                },
               ],
               recursive: false,
               position: (17, 26),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "videoDir",
               position: (25, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (25, 18),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (26, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (26, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "path",
                     position: (26, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (27, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "/srv/vdr/video",
                    position: (27, 20),
                   },
                  ],
                  position: (27, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (28, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Recording directory",
                    position: (28, 24),
                   },
                  ],
                  position: (28, 23),
                 },
                },
               ],
               recursive: false,
               position: (25, 27),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "extraArguments",
               position: (31, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (31, 24),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (32, 9),
                   },
                  ],
                 },
                 to: FunctionApplication {
                  function: PropertyAccess {
                   expression: Variable {
                    identifier: "types",
                    position: (32, 16),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     Raw {
                      content: "listOf",
                      position: (32, 22),
                     },
                    ],
                   },
                   default: None,
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "types",
                     position: (32, 29),
                    },
                    attribute_path: AttributePath {
                     parts: [
                      Raw {
                       content: "str",
                       position: (32, 35),
                      },
                     ],
                    },
                    default: None,
                   },
                  ],
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (33, 9),
                   },
                  ],
                 },
                 to: List {
                  elements: [],
                  position: (33, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (34, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Additional command line arguments to pass to VDR.",
                    position: (34, 24),
                   },
                  ],
                  position: (34, 23),
                 },
                },
               ],
               recursive: false,
               position: (31, 33),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "enableLirc",
               position: (37, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (37, 20),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "LIRC",
                 position: (37, 36),
                },
               ],
               position: (37, 35),
              },
             ],
            },
           },
          ],
          recursive: false,
          position: (14, 20),
         },
        },
       ],
       recursive: false,
       position: (12, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (43, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (43, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (43, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (43, 21),
           },
          ],
         },
         default: None,
        },
        Parentheses {
         expression: FunctionApplication {
          function: Variable {
           identifier: "mkMerge",
           position: (43, 29),
          },
          arguments: [
           List {
            elements: [
             Map {
              bindings: [
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "systemd",
                   position: (44, 5),
                  },
                  Raw {
                   content: "tmpfiles",
                   position: (44, 13),
                  },
                  Raw {
                   content: "rules",
                   position: (44, 22),
                  },
                 ],
                },
                to: List {
                 elements: [
                  String {
                   parts: [
                    Raw {
                     content: "d ",
                     position: (45, 8),
                    },
                    Interpolation {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (45, 12),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "videoDir",
                         position: (45, 16),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " 0755 vdr vdr -",
                     position: (45, 25),
                    },
                   ],
                   position: (45, 7),
                  },
                  String {
                   parts: [
                    Raw {
                     content: "Z ",
                     position: (46, 8),
                    },
                    Interpolation {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (46, 12),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "videoDir",
                         position: (46, 16),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " - vdr vdr -",
                     position: (46, 25),
                    },
                   ],
                   position: (46, 7),
                  },
                 ],
                 position: (44, 30),
                },
               },
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "systemd",
                   position: (49, 5),
                  },
                  Raw {
                   content: "services",
                   position: (49, 13),
                  },
                  Raw {
                   content: "vdr",
                   position: (49, 22),
                  },
                 ],
                },
                to: Map {
                 bindings: [
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "description",
                      position: (50, 7),
                     },
                    ],
                   },
                   to: String {
                    parts: [
                     Raw {
                      content: "VDR",
                      position: (50, 22),
                     },
                    ],
                    position: (50, 21),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "wantedBy",
                      position: (51, 7),
                     },
                    ],
                   },
                   to: List {
                    elements: [
                     String {
                      parts: [
                       Raw {
                        content: "multi-user.target",
                        position: (51, 21),
                       },
                      ],
                      position: (51, 20),
                     },
                    ],
                    position: (51, 18),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "serviceConfig",
                      position: (52, 7),
                     },
                    ],
                   },
                   to: Map {
                    bindings: [
                     Binding {
                      from: AttributePath {
                       parts: [
                        Raw {
                         content: "ExecStart",
                         position: (53, 9),
                        },
                       ],
                      },
                      to: String {
                       parts: [
                        Raw {
                         content: "",
                         position: (54, 1),
                        },
                        Interpolation {
                         expression: PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (54, 13),
                          },
                          attribute_path: AttributePath {
                           parts: [
                            Raw {
                             content: "package",
                             position: (54, 17),
                            },
                           ],
                          },
                          default: None,
                         },
                        },
                        Raw {
                         content: "/bin/vdr \\\n  --video=\"",
                         position: (54, 25),
                        },
                        Interpolation {
                         expression: PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (55, 24),
                          },
                          attribute_path: AttributePath {
                           parts: [
                            Raw {
                             content: "videoDir",
                             position: (55, 28),
                            },
                           ],
                          },
                          default: None,
                         },
                        },
                        Raw {
                         content: "\" \\\n  --config=\"",
                         position: (55, 37),
                        },
                        Interpolation {
                         expression: Variable {
                          identifier: "libDir",
                          position: (56, 25),
                         },
                        },
                        Raw {
                         content: "\" \\\n  ",
                         position: (56, 32),
                        },
                        Interpolation {
                         expression: FunctionApplication {
                          function: Variable {
                           identifier: "escapeShellArgs",
                           position: (57, 15),
                          },
                          arguments: [
                           PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (57, 31),
                            },
                            attribute_path: AttributePath {
                             parts: [
                              Raw {
                               content: "extraArguments",
                               position: (57, 35),
                              },
                             ],
                            },
                            default: None,
                           },
                          ],
                         },
                        },
                        Raw {
                         content: "\n",
                         position: (57, 50),
                        },
                       ],
                       position: (53, 21),
                      },
                     },
                     Binding {
                      from: AttributePath {
                       parts: [
                        Raw {
                         content: "User",
                         position: (59, 9),
                        },
                       ],
                      },
                      to: String {
                       parts: [
                        Raw {
                         content: "vdr",
                         position: (59, 17),
                        },
                       ],
                       position: (59, 16),
                      },
                     },
                     Binding {
                      from: AttributePath {
                       parts: [
                        Raw {
                         content: "CacheDirectory",
                         position: (60, 9),
                        },
                       ],
                      },
                      to: String {
                       parts: [
                        Raw {
                         content: "vdr",
                         position: (60, 27),
                        },
                       ],
                       position: (60, 26),
                      },
                     },
                     Binding {
                      from: AttributePath {
                       parts: [
                        Raw {
                         content: "StateDirectory",
                         position: (61, 9),
                        },
                       ],
                      },
                      to: String {
                       parts: [
                        Raw {
                         content: "vdr",
                         position: (61, 27),
                        },
                       ],
                       position: (61, 26),
                      },
                     },
                     Binding {
                      from: AttributePath {
                       parts: [
                        Raw {
                         content: "Restart",
                         position: (62, 9),
                        },
                       ],
                      },
                      to: String {
                       parts: [
                        Raw {
                         content: "on-failure",
                         position: (62, 20),
                        },
                       ],
                       position: (62, 19),
                      },
                     },
                    ],
                    recursive: false,
                    position: (52, 23),
                   },
                  },
                 ],
                 recursive: false,
                 position: (49, 28),
                },
               },
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "users",
                   position: (66, 5),
                  },
                  Raw {
                   content: "users",
                   position: (66, 11),
                  },
                  Raw {
                   content: "vdr",
                   position: (66, 17),
                  },
                 ],
                },
                to: Map {
                 bindings: [
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "group",
                      position: (67, 7),
                     },
                    ],
                   },
                   to: String {
                    parts: [
                     Raw {
                      content: "vdr",
                      position: (67, 16),
                     },
                    ],
                    position: (67, 15),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "home",
                      position: (68, 7),
                     },
                    ],
                   },
                   to: Variable {
                    identifier: "libDir",
                    position: (68, 14),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "isSystemUser",
                      position: (69, 7),
                     },
                    ],
                   },
                   to: Variable {
                    identifier: "true",
                    position: (69, 22),
                   },
                  },
                 ],
                 recursive: false,
                 position: (66, 23),
                },
               },
               Binding {
                from: AttributePath {
                 parts: [
                  Raw {
                   content: "users",
                   position: (72, 5),
                  },
                  Raw {
                   content: "groups",
                   position: (72, 11),
                  },
                  Raw {
                   content: "vdr",
                   position: (72, 18),
                  },
                 ],
                },
                to: Map {
                 bindings: [],
                 recursive: false,
                 position: (72, 24),
                },
               },
              ],
              recursive: false,
              position: (43, 38),
             },
             Parentheses {
              expression: FunctionApplication {
               function: Variable {
                identifier: "mkIf",
                position: (75, 4),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (75, 9),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "enableLirc",
                    position: (75, 13),
                   },
                  ],
                 },
                 default: None,
                },
                Map {
                 bindings: [
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "services",
                      position: (76, 5),
                     },
                     Raw {
                      content: "lirc",
                      position: (76, 14),
                     },
                     Raw {
                      content: "enable",
                      position: (76, 19),
                     },
                    ],
                   },
                   to: Variable {
                    identifier: "true",
                    position: (76, 28),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "users",
                      position: (77, 5),
                     },
                     Raw {
                      content: "users",
                      position: (77, 11),
                     },
                     Raw {
                      content: "vdr",
                      position: (77, 17),
                     },
                     Raw {
                      content: "extraGroups",
                      position: (77, 21),
                     },
                    ],
                   },
                   to: List {
                    elements: [
                     String {
                      parts: [
                       Raw {
                        content: "lirc",
                        position: (77, 38),
                       },
                      ],
                      position: (77, 37),
                     },
                    ],
                    position: (77, 35),
                   },
                  },
                  Binding {
                   from: AttributePath {
                    parts: [
                     Raw {
                      content: "services",
                      position: (78, 5),
                     },
                     Raw {
                      content: "vdr",
                      position: (78, 14),
                     },
                     Raw {
                      content: "extraArguments",
                      position: (78, 18),
                     },
                    ],
                   },
                   to: List {
                    elements: [
                     String {
                      parts: [
                       Raw {
                        content: "--lirc=",
                        position: (79, 8),
                       },
                       Interpolation {
                        expression: PropertyAccess {
                         expression: Variable {
                          identifier: "config",
                          position: (79, 17),
                         },
                         attribute_path: AttributePath {
                          parts: [
                           Raw {
                            content: "passthru",
                            position: (79, 24),
                           },
                           Raw {
                            content: "lirc",
                            position: (79, 33),
                           },
                           Raw {
                            content: "socket",
                            position: (79, 38),
                           },
                          ],
                         },
                         default: None,
                        },
                       },
                      ],
                      position: (79, 7),
                     },
                    ],
                    position: (78, 35),
                   },
                  },
                 ],
                 recursive: false,
                 position: (75, 24),
                },
               ],
              },
              position: (75, 3),
             },
            ],
            position: (43, 37),
           },
          ],
         },
         position: (43, 28),
        },
       ],
      },
     },
    ],
    recursive: false,
    position: (8, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}