---
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: "logkeys",
         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: "logkeys",
         position: (8, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (9, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (9, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "logkeys service",
              position: (9, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "device",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (11, 14),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (12, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Use the given device as keyboard input event device instead of /dev/input/eventX default.",
                 position: (12, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (13, 7),
                },
               ],
              },
              Variable {
               identifier: "null",
               position: (13, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (14, 7),
                },
               ],
              },
              FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (14, 14),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "nullOr",
                   position: (14, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (14, 27),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "str",
                    position: (14, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (15, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "/dev/input/event15",
                 position: (15, 18),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (11, 23),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (8, 30),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (19, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (19, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (19, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (19, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (20, 5),
             },
             Raw {
              content: "services",
              position: (20, 13),
             },
             Raw {
              content: "logkeys",
              position: (20, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (21, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "LogKeys Keylogger Daemon",
                 position: (21, 22),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (22, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (22, 21),
                  },
                 ],
                },
               ],
               position: (22, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (23, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (24, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (24, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "logkeys",
                        position: (24, 29),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/logkeys -s",
                    position: (24, 37),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "lib",
                       position: (24, 54),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "optionalString",
                         position: (24, 58),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      BinaryOperation {
                       operator: NotEqualTo,
                       operands: [
                        PropertyAccess {
                         expression: Variable {
                          identifier: "cfg",
                          position: (24, 74),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "device",
                            position: (24, 78),
                           },
                          ],
                         },
                         default: None,
                        },
                        Variable {
                         identifier: "null",
                         position: (24, 88),
                        },
                       ],
                       position: (24, 85),
                      },
                      String {
                       parts: [
                        Raw {
                         content: " -d ",
                         position: (24, 95),
                        },
                        Expression {
                         expression: PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (24, 101),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "device",
                             position: (24, 105),
                            },
                           ],
                          },
                          default: None,
                         },
                        },
                       ],
                      },
                     ],
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStop",
                    position: (25, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (25, 23),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "logkeys",
                        position: (25, 28),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/logkeys -k",
                    position: (25, 36),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (26, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "forking",
                    position: (26, 17),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (23, 23),
              },
             ),
            ],
            recursive: false,
            position: (20, 32),
           },
          ),
         ],
         recursive: false,
         position: (19, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (7, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}