---
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: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "interception-tools",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (8, 3),
        },
        Raw {
         content: "services",
         position: (8, 11),
        },
        Raw {
         content: "interception-tools",
         position: (8, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (9, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (9, 14),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (10, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (10, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (10, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (11, 7),
                },
               ],
              },
              Variable {
               identifier: "false",
               position: (11, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (12, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Whether to enable the interception tools service.",
                 position: (12, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (9, 23),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "plugins",
            position: (15, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (15, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (16, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (16, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "listOf",
                   position: (16, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (16, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "package",
                    position: (16, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (17, 7),
                },
               ],
              },
              List {
               elements: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "pkgs",
                  position: (17, 19),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "interception-tools-plugins",
                    position: (17, 24),
                   },
                   Raw {
                    content: "caps2esc",
                    position: (17, 51),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (17, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (18, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (18, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "[ pkgs.interception-tools-plugins.caps2esc ]",
                   position: (18, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (19, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "A list of interception tools plugins that will be made available to use\ninside the udevmon configuration.\n",
                 position: (20, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (15, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "udevmonConfig",
            position: (25, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (25, 21),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (26, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (26, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "either",
                   position: (26, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (26, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (26, 33),
                   },
                  ],
                 },
                 default: None,
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (26, 37),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "path",
                    position: (26, 43),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (27, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "- JOB: \"intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE\"\n  DEVICE:\n    EVENTS:\n      EV_KEY: [KEY_CAPSLOCK, KEY_ESC]\n",
                 position: (28, 1),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (33, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "- JOB: \"intercept -g $DEVNODE | y2z | x2y | uinput -d $DEVNODE\"\n  DEVICE:\n    EVENTS:\n      EV_KEY: [KEY_X, KEY_Y]\n",
                 position: (34, 1),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (39, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "String of udevmon YAML configuration, or path to a udevmon YAML\nconfiguration file.\n",
                 position: (40, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (25, 30),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (8, 41),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (46, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (46, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (46, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (46, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (47, 5),
             },
             Raw {
              content: "services",
              position: (47, 13),
             },
             Raw {
              content: "interception-tools",
              position: (47, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (48, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Interception tools",
                 position: (48, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (49, 7),
                },
               ],
              },
              BinaryOperation {
               operator: Concatenation,
               operands: [
                List {
                 elements: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (49, 16),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "bash",
                      position: (49, 21),
                     },
                    ],
                   },
                   default: None,
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "pkgs",
                    position: (49, 26),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "interception-tools",
                      position: (49, 31),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                 position: (49, 14),
                },
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (49, 55),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "plugins",
                    position: (49, 59),
                   },
                  ],
                 },
                 default: None,
                },
               ],
               position: (49, 52),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (50, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (51, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "",
                    position: (52, 1),
                   },
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (52, 13),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "interception-tools",
                        position: (52, 18),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/udevmon -c \\\n",
                    position: (52, 37),
                   },
                   Expression {
                    expression: IfThenElse {
                     predicate: BinaryOperation {
                      operator: EqualTo,
                      operands: [
                       FunctionApplication {
                        function: PropertyAccess {
                         expression: Variable {
                          identifier: "builtins",
                          position: (53, 16),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "typeOf",
                            position: (53, 25),
                           },
                          ],
                         },
                         default: None,
                        },
                        arguments: [
                         PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (53, 32),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "udevmonConfig",
                             position: (53, 36),
                            },
                           ],
                          },
                          default: None,
                         },
                        ],
                       },
                       String {
                        parts: [
                         Raw {
                          content: "path",
                          position: (53, 54),
                         },
                        ],
                       },
                      ],
                      position: (53, 50),
                     },
                     then: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (54, 16),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "udevmonConfig",
                         position: (54, 20),
                        },
                       ],
                      },
                      default: None,
                     },
                     else_: FunctionApplication {
                      function: PropertyAccess {
                       expression: Variable {
                        identifier: "pkgs",
                        position: (55, 16),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "writeText",
                          position: (55, 21),
                         },
                        ],
                       },
                       default: None,
                      },
                      arguments: [
                       String {
                        parts: [
                         Raw {
                          content: "udevmon.yaml",
                          position: (55, 32),
                         },
                        ],
                       },
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (55, 46),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "udevmonConfig",
                           position: (55, 50),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                     position: (53, 13),
                    },
                   },
                   Raw {
                    content: "\n",
                    position: (55, 64),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Nice",
                    position: (57, 9),
                   },
                  ],
                 },
                 UnaryOperation {
                  operator: Negate,
                  operand: Int {
                   value: 20,
                   position: (57, 17),
                  },
                  position: (57, 16),
                 },
                ),
               ],
               recursive: false,
               position: (50, 23),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (59, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (59, 21),
                  },
                 ],
                },
               ],
               position: (59, 18),
              },
             ),
            ],
            recursive: false,
            position: (47, 43),
           },
          ),
         ],
         recursive: false,
         position: (46, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (7, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}