---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    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: "hardware",
         position: (6, 16),
        },
        Raw {
         content: "ksm",
         position: (6, 25),
        },
       ],
      },
      default: None,
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "imports",
         position: (9, 3),
        },
       ],
      },
      to: List {
       elements: [
        Parentheses {
         expression: FunctionApplication {
          function: Variable {
           identifier: "mkRenamedOptionModule",
           position: (10, 6),
          },
          arguments: [
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "hardware",
                position: (10, 31),
               },
              ],
              position: (10, 30),
             },
             String {
              parts: [
               Raw {
                content: "enableKSM",
                position: (10, 42),
               },
              ],
              position: (10, 41),
             },
            ],
            position: (10, 28),
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "hardware",
                position: (10, 58),
               },
              ],
              position: (10, 57),
             },
             String {
              parts: [
               Raw {
                content: "ksm",
                position: (10, 69),
               },
              ],
              position: (10, 68),
             },
             String {
              parts: [
               Raw {
                content: "enable",
                position: (10, 75),
               },
              ],
              position: (10, 74),
             },
            ],
            position: (10, 55),
           },
          ],
         },
         position: (10, 5),
        },
       ],
       position: (9, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (13, 3),
        },
        Raw {
         content: "hardware",
         position: (13, 11),
        },
        Raw {
         content: "ksm",
         position: (13, 20),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (14, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (14, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "Kernel Same-Page Merging",
              position: (14, 30),
             },
            ],
            position: (14, 29),
           },
          ],
         },
        },
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "sleep",
            position: (15, 5),
           },
          ],
         },
         to: FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (15, 13),
          },
          arguments: [
           Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "type",
                 position: (16, 7),
                },
               ],
              },
              to: FunctionApplication {
               function: PropertyAccess {
                expression: Variable {
                 identifier: "types",
                 position: (16, 14),
                },
                attribute_path: AttributePath {
                 parts: [
                  Raw {
                   content: "nullOr",
                   position: (16, 20),
                  },
                 ],
                },
                default: None,
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "types",
                  position: (16, 27),
                 },
                 attribute_path: AttributePath {
                  parts: [
                   Raw {
                    content: "int",
                    position: (16, 33),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "default",
                 position: (17, 7),
                },
               ],
              },
              to: Variable {
               identifier: "null",
               position: (17, 17),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (18, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "How many milliseconds ksmd should sleep between scans.\nSetting it to <literal>null</literal> uses the kernel's default time.\n",
                 position: (19, 1),
                },
               ],
               position: (18, 21),
              },
             },
            ],
            recursive: false,
            position: (15, 22),
           },
          ],
         },
        },
       ],
       recursive: false,
       position: (13, 26),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (25, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (25, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (25, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (25, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (26, 5),
             },
             Raw {
              content: "services",
              position: (26, 13),
             },
             Raw {
              content: "enable-ksm",
              position: (26, 22),
             },
            ],
           },
           to: Map {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "description",
                 position: (27, 7),
                },
               ],
              },
              to: String {
               parts: [
                Raw {
                 content: "Enable Kernel Same-Page Merging",
                 position: (27, 22),
                },
               ],
               position: (27, 21),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "wantedBy",
                 position: (28, 7),
                },
               ],
              },
              to: List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (28, 21),
                  },
                 ],
                 position: (28, 20),
                },
               ],
               position: (28, 18),
              },
             },
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "script",
                 position: (29, 7),
                },
               ],
              },
              to: BinaryOperation {
               operator: Addition,
               operands: [
                String {
                 parts: [
                  Raw {
                   content: "echo 1 > /sys/kernel/mm/ksm/run\n",
                   position: (31, 1),
                  },
                 ],
                 position: (30, 9),
                },
                FunctionApplication {
                 function: Variable {
                  identifier: "optionalString",
                  position: (32, 14),
                 },
                 arguments: [
                  Parentheses {
                   expression: BinaryOperation {
                    operator: NotEqualTo,
                    operands: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (32, 30),
                      },
                      attribute_path: AttributePath {
                       parts: [
                        Raw {
                         content: "sleep",
                         position: (32, 34),
                        },
                       ],
                      },
                      default: None,
                     },
                     Variable {
                      identifier: "null",
                      position: (32, 43),
                     },
                    ],
                    position: (32, 40),
                   },
                   position: (32, 29),
                  },
                  String {
                   parts: [
                    Raw {
                     content: "echo ",
                     position: (34, 1),
                    },
                    Interpolation {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "toString",
                       position: (34, 18),
                      },
                      arguments: [
                       PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (34, 27),
                        },
                        attribute_path: AttributePath {
                         parts: [
                          Raw {
                           content: "sleep",
                           position: (34, 31),
                          },
                         ],
                        },
                        default: None,
                       },
                      ],
                     },
                    },
                    Raw {
                     content: " > /sys/kernel/mm/ksm/sleep_millisecs\n",
                     position: (34, 37),
                    },
                   ],
                   position: (33, 9),
                  },
                 ],
                },
               ],
               position: (32, 12),
              },
             },
            ],
            recursive: false,
            position: (26, 35),
           },
          },
         ],
         recursive: false,
         position: (25, 28),
        },
       ],
      },
     },
    ],
    recursive: false,
    position: (8, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}