---
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: "enabled",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "elem",
       position: (7, 13),
      },
      arguments: [
       String {
        parts: [
         Raw {
          content: "displaylink",
          position: (7, 19),
         },
        ],
       },
       PropertyAccess {
        expression: Variable {
         identifier: "config",
         position: (7, 32),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "services",
           position: (7, 39),
          },
          Raw {
           content: "xserver",
           position: (7, 48),
          },
          Raw {
           content: "videoDrivers",
           position: (7, 56),
          },
         ],
        },
        default: None,
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "evdi",
        position: (9, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (9, 10),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "boot",
         position: (9, 17),
        },
        Raw {
         content: "kernelPackages",
         position: (9, 22),
        },
        Raw {
         content: "evdi",
         position: (9, 37),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "displaylink",
        position: (11, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (11, 17),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "displaylink",
          position: (11, 22),
         },
         Raw {
          content: "override",
          position: (11, 34),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [
         Inherit(
          None,
          [
           Raw {
            content: "evdi",
            position: (12, 13),
           },
          ],
         ),
        ],
        recursive: false,
        position: (11, 43),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (19, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (19, 12),
       },
       arguments: [
        Variable {
         identifier: "enabled",
         position: (19, 17),
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (21, 5),
             },
             Raw {
              content: "extraModulePackages",
              position: (21, 10),
             },
            ],
           },
           List {
            elements: [
             Variable {
              identifier: "evdi",
              position: (21, 34),
             },
            ],
            position: (21, 32),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (22, 5),
             },
             Raw {
              content: "kernelModules",
              position: (22, 10),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "evdi",
                position: (22, 29),
               },
              ],
             },
            ],
            position: (22, 26),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (24, 5),
             },
             Raw {
              content: "etc",
              position: (24, 17),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "X11/xorg.conf.d/40-displaylink.conf",
                 position: (24, 22),
                },
               ],
              },
             },
             Raw {
              content: "text",
              position: (24, 59),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "Section \"OutputClass\"\n  Identifier  \"DisplayLink\"\n  MatchDriver \"evdi\"\n  Driver      \"modesetting\"\n  Option      \"AccelMethod\" \"none\"\nEndSection\n",
              position: (25, 1),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (34, 5),
             },
             Raw {
              content: "xserver",
              position: (34, 14),
             },
             Raw {
              content: "displayManager",
              position: (34, 22),
             },
             Raw {
              content: "sessionCommands",
              position: (34, 37),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "",
              position: (35, 1),
             },
             Expression {
              expression: FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "lib",
                 position: (35, 9),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "getBin",
                   position: (35, 13),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (35, 20),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "xorg",
                    position: (35, 25),
                   },
                   Raw {
                    content: "xrandr",
                    position: (35, 30),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             },
             Raw {
              content: "/bin/xrandr --setprovideroutputsource 1 0\n",
              position: (35, 37),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (40, 5),
             },
             Raw {
              content: "udev",
              position: (40, 14),
             },
             Raw {
              content: "packages",
              position: (40, 19),
             },
            ],
           },
           List {
            elements: [
             Variable {
              identifier: "displaylink",
              position: (40, 32),
             },
            ],
            position: (40, 30),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "powerManagement",
              position: (42, 5),
             },
             Raw {
              content: "powerDownCommands",
              position: (42, 21),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "#flush any bytes in pipe\nwhile read -n 1 -t 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out; do : ; done;\n\n#suspend DisplayLinkManager\necho \"S\" > /tmp/PmMessagesPort_in\n\n#wait until suspend of DisplayLinkManager finish\nif [ -f /tmp/PmMessagesPort_out ]; then\n  #wait until suspend of DisplayLinkManager finish\n  read -n 1 -t 10 SUSPEND_RESULT < /tmp/PmMessagesPort_out\nfi\n",
              position: (43, 1),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "powerManagement",
              position: (56, 5),
             },
             Raw {
              content: "resumeCommands",
              position: (56, 21),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "#resume DisplayLinkManager\necho \"R\" > /tmp/PmMessagesPort_in\n",
              position: (57, 1),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (61, 5),
             },
             Raw {
              content: "services",
              position: (61, 13),
             },
             Raw {
              content: "dlm",
              position: (61, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (62, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "DisplayLink Manager Service",
                 position: (62, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (63, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "display-manager.service",
                   position: (63, 18),
                  },
                 ],
                },
               ],
               position: (63, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "conflicts",
                 position: (64, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "getty@tty7.service",
                   position: (64, 22),
                  },
                 ],
                },
               ],
               position: (64, 19),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (66, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (67, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: Variable {
                     identifier: "displaylink",
                     position: (67, 24),
                    },
                   },
                   Raw {
                    content: "/bin/DisplayLinkManager",
                    position: (67, 36),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (68, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "always",
                    position: (68, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RestartSec",
                    position: (69, 9),
                   },
                  ],
                 },
                 Int {
                  value: 5,
                  position: (69, 22),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "LogsDirectory",
                    position: (70, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "displaylink",
                    position: (70, 26),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (66, 23),
              },
             ),
            ],
            recursive: false,
            position: (61, 28),
           },
          ),
         ],
         recursive: false,
         position: (19, 25),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (17, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}