---
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: (7, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (7, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "zramSwap",
         position: (7, 16),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "devicesCount",
        position: (11, 3),
       },
      ],
     },
     IfThenElse {
      predicate: BinaryOperation {
       operator: NotEqualTo,
       operands: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (11, 21),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "swapDevices",
            position: (11, 25),
           },
          ],
         },
         default: None,
        },
        Variable {
         identifier: "null",
         position: (11, 40),
        },
       ],
       position: (11, 37),
      },
      then: PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (11, 50),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "swapDevices",
          position: (11, 54),
         },
        ],
       },
       default: None,
      },
      else_: PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (11, 71),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "numDevices",
          position: (11, 75),
         },
        ],
       },
       default: None,
      },
      position: (11, 18),
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "devices",
        position: (13, 3),
       },
      ],
     },
     FunctionApplication {
      function: Variable {
       identifier: "map",
       position: (13, 13),
      },
      arguments: [
       Function {
        argument: Some(
         "nr",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: String {
         parts: [
          Raw {
           content: "zram",
           position: (13, 23),
          },
          Expression {
           expression: FunctionApplication {
            function: Variable {
             identifier: "toString",
             position: (13, 29),
            },
            arguments: [
             Variable {
              identifier: "nr",
              position: (13, 38),
             },
            ],
           },
          },
         ],
        },
        position: (13, 18),
       },
       FunctionApplication {
        function: Variable {
         identifier: "range",
         position: (13, 45),
        },
        arguments: [
         Int {
          value: 0,
          position: (13, 51),
         },
         BinaryOperation {
          operator: Subtraction,
          operands: [
           Variable {
            identifier: "devicesCount",
            position: (13, 54),
           },
           Int {
            value: 1,
            position: (13, 69),
           },
          ],
          position: (13, 67),
         },
        ],
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "modprobe",
        position: (15, 3),
       },
      ],
     },
     String {
      parts: [
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (15, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "kmod",
            position: (15, 22),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "/bin/modprobe",
        position: (15, 27),
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "warnings",
        position: (17, 3),
       },
      ],
     },
     Assert {
      expression: BinaryOperation {
       operator: Implication,
       operands: [
        BinaryOperation {
         operator: NotEqualTo,
         operands: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (18, 10),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "swapDevices",
              position: (18, 14),
             },
            ],
           },
           default: None,
          },
          Variable {
           identifier: "null",
           position: (18, 29),
          },
         ],
         position: (18, 26),
        },
        BinaryOperation {
         operator: GreaterThanOrEqualTo,
         operands: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (18, 37),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "numDevices",
              position: (18, 41),
             },
            ],
           },
           default: None,
          },
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (18, 55),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "swapDevices",
              position: (18, 59),
             },
            ],
           },
           default: None,
          },
         ],
         position: (18, 52),
        },
       ],
       position: (18, 34),
      },
      target: FunctionApplication {
       function: Variable {
        identifier: "flatten",
        position: (19, 3),
       },
       arguments: [
        List {
         elements: [
          FunctionApplication {
           function: Variable {
            identifier: "optional",
            position: (20, 6),
           },
           arguments: [
            BinaryOperation {
             operator: LogicalAnd,
             operands: [
              BinaryOperation {
               operator: GreaterThan,
               operands: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (20, 16),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "numDevices",
                    position: (20, 20),
                   },
                  ],
                 },
                 default: None,
                },
                Int {
                 value: 1,
                 position: (20, 33),
                },
               ],
               position: (20, 31),
              },
              BinaryOperation {
               operator: EqualTo,
               operands: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (20, 38),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "swapDevices",
                    position: (20, 42),
                   },
                  ],
                 },
                 default: None,
                },
                Variable {
                 identifier: "null",
                 position: (20, 57),
                },
               ],
               position: (20, 54),
              },
             ],
             position: (20, 35),
            },
            String {
             parts: [
              Raw {
               content: "Using several small zram devices as swap is no better than using one large.\nSet either zramSwap.numDevices = 1 or explicitly set zramSwap.swapDevices.\n\nPreviously multiple zram devices were used to enable multithreaded\ncompression. Linux supports multithreaded compression for 1 device\nsince 3.15. See https://lkml.org/lkml/2014/2/28/404 for details.\n",
               position: (21, 1),
              },
             ],
            },
           ],
          },
         ],
         position: (19, 11),
        },
       ],
      },
      position: (18, 3),
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (36, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "zramSwap",
            position: (38, 5),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (40, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (40, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (41, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (41, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (42, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (42, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (42, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (43, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Enable in-memory compressed devices and swap space provided by the zram\nkernel module.\nSee <link xlink:href=\"https://www.kernel.org/doc/Documentation/blockdev/zram.txt\">\n  https://www.kernel.org/doc/Documentation/blockdev/zram.txt\n</link>.\n",
                    position: (44, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (40, 25),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "numDevices",
               position: (52, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (52, 20),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (53, 9),
                   },
                  ],
                 },
                 Int {
                  value: 1,
                  position: (53, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (54, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (54, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (54, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (55, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Number of zram devices to create. See also\n<literal>zramSwap.swapDevices</literal>\n",
                    position: (56, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (52, 29),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "swapDevices",
               position: (61, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (61, 21),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (62, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "null",
                  position: (62, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (63, 9),
                   },
                  ],
                 },
                 Int {
                  value: 1,
                  position: (63, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (64, 9),
                   },
                  ],
                 },
                 With {
                  expression: Variable {
                   identifier: "types",
                   position: (64, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "nullOr",
                    position: (64, 28),
                   },
                   arguments: [
                    Variable {
                     identifier: "int",
                     position: (64, 35),
                    },
                   ],
                  },
                  position: (64, 16),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (65, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Number of zram devices to be used as swap. Must be\n<literal>&lt;= zramSwap.numDevices</literal>.\nDefault is same as <literal>zramSwap.numDevices</literal>, recommended is 1.\n",
                    position: (66, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (61, 30),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "memoryPercent",
               position: (72, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (72, 23),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (73, 9),
                   },
                  ],
                 },
                 Int {
                  value: 50,
                  position: (73, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (74, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (74, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (74, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (75, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Maximum amount of memory that can be used by the zram swap devices\n(as a percentage of your total memory). Defaults to 1/2 of your total\nRAM. Run <literal>zramctl</literal> to check how good memory is\ncompressed.\n",
                    position: (76, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (72, 32),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "memoryMax",
               position: (83, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (83, 19),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (84, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "null",
                  position: (84, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (85, 9),
                   },
                  ],
                 },
                 With {
                  expression: Variable {
                   identifier: "types",
                   position: (85, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "nullOr",
                    position: (85, 28),
                   },
                   arguments: [
                    Variable {
                     identifier: "int",
                     position: (85, 35),
                    },
                   ],
                  },
                  position: (85, 16),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (86, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Maximum total amount of memory (in bytes) that can be used by the zram\nswap devices.\n",
                    position: (87, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (83, 28),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "priority",
               position: (92, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (92, 18),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (93, 9),
                   },
                  ],
                 },
                 Int {
                  value: 5,
                  position: (93, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (94, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (94, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "int",
                     position: (94, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (95, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Priority of the zram swap devices. It should be a number higher than\nthe priority of your disk-based swap devices (so that the system will\nfill the zram swap devices before falling back to disk swap).\n",
                    position: (96, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (92, 27),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "algorithm",
               position: (102, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (102, 19),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (103, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "zstd",
                    position: (103, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (104, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "lz4",
                    position: (104, 20),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (105, 9),
                   },
                  ],
                 },
                 With {
                  expression: Variable {
                   identifier: "types",
                   position: (105, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "either",
                    position: (105, 28),
                   },
                   arguments: [
                    FunctionApplication {
                     function: Variable {
                      identifier: "enum",
                      position: (105, 36),
                     },
                     arguments: [
                      List {
                       elements: [
                        String {
                         parts: [
                          Raw {
                           content: "lzo",
                           position: (105, 44),
                          },
                         ],
                        },
                        String {
                         parts: [
                          Raw {
                           content: "lz4",
                           position: (105, 50),
                          },
                         ],
                        },
                        String {
                         parts: [
                          Raw {
                           content: "zstd",
                           position: (105, 56),
                          },
                         ],
                        },
                       ],
                       position: (105, 41),
                      },
                     ],
                    },
                    Variable {
                     identifier: "str",
                     position: (105, 65),
                    },
                   ],
                  },
                  position: (105, 16),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (106, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Compression algorithm. <literal>lzo</literal> has good compression,\nbut is slow. <literal>lz4</literal> has bad compression, but is fast.\n<literal>zstd</literal> is both good compression and fast, but requires newer kernel.\nYou can check what other algorithms are supported by your zram device with\n<programlisting>cat /sys/class/block/zram*/comp_algorithm</programlisting>\n",
                    position: (107, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (102, 28),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (38, 16),
         },
        ),
       ],
       recursive: false,
       position: (36, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (118, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (118, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (118, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (118, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          Inherit(
           None,
           [
            Raw {
             content: "warnings",
             position: (120, 13),
            },
           ],
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "system",
              position: (122, 5),
             },
             Raw {
              content: "requiredKernelConfig",
              position: (122, 12),
             },
            ],
           },
           With {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "config",
              position: (122, 40),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "lib",
                position: (122, 47),
               },
               Raw {
                content: "kernelConfig",
                position: (122, 51),
               },
              ],
             },
             default: None,
            },
            target: List {
             elements: [
              FunctionApplication {
               function: Variable {
                identifier: "isModule",
                position: (123, 8),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "ZRAM",
                   position: (123, 18),
                  },
                 ],
                },
               ],
              },
             ],
             position: (122, 65),
            },
            position: (122, 35),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "boot",
              position: (130, 5),
             },
             Raw {
              content: "extraModprobeConfig",
              position: (130, 10),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "options zram num_devices=",
              position: (131, 1),
             },
             Expression {
              expression: FunctionApplication {
               function: Variable {
                identifier: "toString",
                position: (131, 34),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (131, 43),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "numDevices",
                    position: (131, 47),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             },
             Raw {
              content: "\n",
              position: (131, 58),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (134, 5),
             },
             Raw {
              content: "udev",
              position: (134, 14),
             },
             Raw {
              content: "extraRules",
              position: (134, 19),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "KERNEL==\"zram[0-9]*\", ENV{SYSTEMD_WANTS}=\"zram-init-%k.service\", TAG+=\"systemd\"\n",
              position: (135, 1),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (138, 5),
             },
             Raw {
              content: "services",
              position: (138, 13),
             },
            ],
           },
           LetIn {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "createZramInitService",
                 position: (140, 9),
                },
               ],
              },
              Function {
               argument: Some(
                "dev",
               ),
               arguments: FunctionArguments {
                arguments: [],
                ellipsis: false,
               },
               definition: FunctionApplication {
                function: Variable {
                 identifier: "nameValuePair",
                 position: (141, 11),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: "zram-init-",
                    position: (141, 26),
                   },
                   Expression {
                    expression: Variable {
                     identifier: "dev",
                     position: (141, 38),
                    },
                   },
                  ],
                 },
                 Map {
                  bindings: [
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "description",
                       position: (142, 13),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "Init swap on zram-based device ",
                       position: (142, 28),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "dev",
                        position: (142, 61),
                       },
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "after",
                       position: (143, 13),
                      },
                     ],
                    },
                    List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "dev-",
                         position: (143, 24),
                        },
                        Expression {
                         expression: Variable {
                          identifier: "dev",
                          position: (143, 30),
                         },
                        },
                        Raw {
                         content: ".device",
                         position: (143, 34),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Raw {
                         content: "zram-reloader.service",
                         position: (143, 44),
                        },
                       ],
                      },
                     ],
                     position: (143, 21),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "requires",
                       position: (144, 13),
                      },
                     ],
                    },
                    List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "dev-",
                         position: (144, 27),
                        },
                        Expression {
                         expression: Variable {
                          identifier: "dev",
                          position: (144, 33),
                         },
                        },
                        Raw {
                         content: ".device",
                         position: (144, 37),
                        },
                       ],
                      },
                      String {
                       parts: [
                        Raw {
                         content: "zram-reloader.service",
                         position: (144, 47),
                        },
                       ],
                      },
                     ],
                     position: (144, 24),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "before",
                       position: (145, 13),
                      },
                     ],
                    },
                    List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "dev-",
                         position: (145, 25),
                        },
                        Expression {
                         expression: Variable {
                          identifier: "dev",
                          position: (145, 31),
                         },
                        },
                        Raw {
                         content: ".swap",
                         position: (145, 35),
                        },
                       ],
                      },
                     ],
                     position: (145, 22),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "requiredBy",
                       position: (146, 13),
                      },
                     ],
                    },
                    List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "dev-",
                         position: (146, 29),
                        },
                        Expression {
                         expression: Variable {
                          identifier: "dev",
                          position: (146, 35),
                         },
                        },
                        Raw {
                         content: ".swap",
                         position: (146, 39),
                        },
                       ],
                      },
                     ],
                     position: (146, 26),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "unitConfig",
                       position: (147, 13),
                      },
                      Raw {
                       content: "DefaultDependencies",
                       position: (147, 24),
                      },
                     ],
                    },
                    Variable {
                     identifier: "false",
                     position: (147, 46),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "serviceConfig",
                       position: (148, 13),
                      },
                     ],
                    },
                    Map {
                     bindings: [
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "Type",
                          position: (149, 15),
                         },
                        ],
                       },
                       String {
                        parts: [
                         Raw {
                          content: "oneshot",
                          position: (149, 23),
                         },
                        ],
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "RemainAfterExit",
                          position: (150, 15),
                         },
                        ],
                       },
                       Variable {
                        identifier: "true",
                        position: (150, 33),
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "ExecStop",
                          position: (151, 15),
                         },
                        ],
                       },
                       String {
                        parts: [
                         Expression {
                          expression: PropertyAccess {
                           expression: Variable {
                            identifier: "pkgs",
                            position: (151, 29),
                           },
                           attribute_path: AttributePath {
                            attributes: [
                             Raw {
                              content: "runtimeShell",
                              position: (151, 34),
                             },
                            ],
                           },
                           default: None,
                          },
                         },
                         Raw {
                          content: " -c 'echo 1 > /sys/class/block/",
                          position: (151, 47),
                         },
                         Expression {
                          expression: Variable {
                           identifier: "dev",
                           position: (151, 80),
                          },
                         },
                         Raw {
                          content: "/reset'",
                          position: (151, 84),
                         },
                        ],
                       },
                      ),
                     ],
                     recursive: false,
                     position: (148, 29),
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "script",
                       position: (153, 13),
                      },
                     ],
                    },
                    String {
                     parts: [
                      Raw {
                       content: "set -euo pipefail\n\n# Calculate memory to use for zram\nmem=$(",
                       position: (154, 1),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (157, 23),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "gawk",
                           position: (157, 28),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "/bin/awk '/MemTotal: / {\n    value=int($2*",
                       position: (157, 33),
                      },
                      Expression {
                       expression: FunctionApplication {
                        function: Variable {
                         identifier: "toString",
                         position: (158, 34),
                        },
                        arguments: [
                         PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (158, 43),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "memoryPercent",
                             position: (158, 47),
                            },
                           ],
                          },
                          default: None,
                         },
                        ],
                       },
                      },
                      Raw {
                       content: "/100.0/",
                       position: (158, 61),
                      },
                      Expression {
                       expression: FunctionApplication {
                        function: Variable {
                         identifier: "toString",
                         position: (158, 70),
                        },
                        arguments: [
                         Variable {
                          identifier: "devicesCount",
                          position: (158, 79),
                         },
                        ],
                       },
                      },
                      Raw {
                       content: "*1024);\n      ",
                       position: (158, 92),
                      },
                      Expression {
                       expression: FunctionApplication {
                        function: PropertyAccess {
                         expression: Variable {
                          identifier: "lib",
                          position: (159, 23),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "optionalString",
                            position: (159, 27),
                           },
                          ],
                         },
                         default: None,
                        },
                        arguments: [
                         BinaryOperation {
                          operator: NotEqualTo,
                          operands: [
                           PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (159, 43),
                            },
                            attribute_path: AttributePath {
                             attributes: [
                              Raw {
                               content: "memoryMax",
                               position: (159, 47),
                              },
                             ],
                            },
                            default: None,
                           },
                           Variable {
                            identifier: "null",
                            position: (159, 60),
                           },
                          ],
                          position: (159, 57),
                         },
                         String {
                          parts: [
                           Raw {
                            content: "memory_max=int(",
                            position: (160, 1),
                           },
                           Expression {
                            expression: FunctionApplication {
                             function: Variable {
                              identifier: "toString",
                              position: (160, 40),
                             },
                             arguments: [
                              PropertyAccess {
                               expression: Variable {
                                identifier: "cfg",
                                position: (160, 49),
                               },
                               attribute_path: AttributePath {
                                attributes: [
                                 Raw {
                                  content: "memoryMax",
                                  position: (160, 53),
                                 },
                                ],
                               },
                               default: None,
                              },
                             ],
                            },
                           },
                           Raw {
                            content: "/",
                            position: (160, 63),
                           },
                           Expression {
                            expression: FunctionApplication {
                             function: Variable {
                              identifier: "toString",
                              position: (160, 66),
                             },
                             arguments: [
                              Variable {
                               identifier: "devicesCount",
                               position: (160, 75),
                              },
                             ],
                            },
                           },
                           Raw {
                            content: ");\nif (value > memory_max) { value = memory_max }\n",
                            position: (160, 88),
                           },
                          ],
                         },
                        ],
                       },
                      },
                      Raw {
                       content: "\n    print value\n}' /proc/meminfo)\n\n",
                       position: (162, 24),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (166, 17),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "util-linux",
                           position: (166, 22),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "/sbin/zramctl --size $mem --algorithm ",
                       position: (166, 33),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "cfg",
                         position: (166, 73),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "algorithm",
                           position: (166, 77),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: " /dev/",
                       position: (166, 87),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "dev",
                        position: (166, 95),
                       },
                      },
                      Raw {
                       content: "\n",
                       position: (166, 99),
                      },
                      Expression {
                       expression: PropertyAccess {
                        expression: Variable {
                         identifier: "pkgs",
                         position: (167, 17),
                        },
                        attribute_path: AttributePath {
                         attributes: [
                          Raw {
                           content: "util-linux",
                           position: (167, 22),
                          },
                         ],
                        },
                        default: None,
                       },
                      },
                      Raw {
                       content: "/sbin/mkswap /dev/",
                       position: (167, 33),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "dev",
                        position: (167, 53),
                       },
                      },
                      Raw {
                       content: "\n",
                       position: (167, 57),
                      },
                     ],
                    },
                   ),
                   KeyValue(
                    AttributePath {
                     attributes: [
                      Raw {
                       content: "restartIfChanged",
                       position: (169, 13),
                      },
                     ],
                    },
                    Variable {
                     identifier: "false",
                     position: (169, 32),
                    },
                   ),
                  ],
                  recursive: false,
                  position: (141, 44),
                 },
                ],
               },
               position: (140, 33),
              },
             ),
            ],
            target: FunctionApplication {
             function: Variable {
              identifier: "listToAttrs",
              position: (171, 10),
             },
             arguments: [
              BinaryOperation {
               operator: Concatenation,
               operands: [
                FunctionApplication {
                 function: Variable {
                  identifier: "map",
                  position: (171, 24),
                 },
                 arguments: [
                  Variable {
                   identifier: "createZramInitService",
                   position: (171, 28),
                  },
                  Variable {
                   identifier: "devices",
                   position: (171, 50),
                  },
                 ],
                },
                List {
                 elements: [
                  FunctionApplication {
                   function: Variable {
                    identifier: "nameValuePair",
                    position: (171, 64),
                   },
                   arguments: [
                    String {
                     parts: [
                      Raw {
                       content: "zram-reloader",
                       position: (171, 79),
                      },
                     ],
                    },
                    Map {
                     bindings: [
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "description",
                          position: (173, 11),
                         },
                        ],
                       },
                       String {
                        parts: [
                         Raw {
                          content: "Reload zram kernel module when number of devices changes",
                          position: (173, 26),
                         },
                        ],
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "wants",
                          position: (174, 11),
                         },
                        ],
                       },
                       List {
                        elements: [
                         String {
                          parts: [
                           Raw {
                            content: "systemd-udevd.service",
                            position: (174, 22),
                           },
                          ],
                         },
                        ],
                        position: (174, 19),
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "after",
                          position: (175, 11),
                         },
                        ],
                       },
                       List {
                        elements: [
                         String {
                          parts: [
                           Raw {
                            content: "systemd-udevd.service",
                            position: (175, 22),
                           },
                          ],
                         },
                        ],
                        position: (175, 19),
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "unitConfig",
                          position: (176, 11),
                         },
                         Raw {
                          content: "DefaultDependencies",
                          position: (176, 22),
                         },
                        ],
                       },
                       Variable {
                        identifier: "false",
                        position: (176, 44),
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "serviceConfig",
                          position: (177, 11),
                         },
                        ],
                       },
                       Map {
                        bindings: [
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "Type",
                             position: (178, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Raw {
                             content: "oneshot",
                             position: (178, 21),
                            },
                           ],
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "RemainAfterExit",
                             position: (179, 13),
                            },
                           ],
                          },
                          Variable {
                           identifier: "true",
                           position: (179, 31),
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "ExecStartPre",
                             position: (180, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Expression {
                             expression: Variable {
                              identifier: "modprobe",
                              position: (180, 31),
                             },
                            },
                            Raw {
                             content: " -r zram",
                             position: (180, 40),
                            },
                           ],
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "ExecStart",
                             position: (181, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Expression {
                             expression: Variable {
                              identifier: "modprobe",
                              position: (181, 28),
                             },
                            },
                            Raw {
                             content: " zram",
                             position: (181, 37),
                            },
                           ],
                          },
                         ),
                         KeyValue(
                          AttributePath {
                           attributes: [
                            Raw {
                             content: "ExecStop",
                             position: (182, 13),
                            },
                           ],
                          },
                          String {
                           parts: [
                            Expression {
                             expression: Variable {
                              identifier: "modprobe",
                              position: (182, 27),
                             },
                            },
                            Raw {
                             content: " -r zram",
                             position: (182, 36),
                            },
                           ],
                          },
                         ),
                        ],
                        recursive: false,
                        position: (177, 27),
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "restartTriggers",
                          position: (184, 11),
                         },
                        ],
                       },
                       List {
                        elements: [
                         PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (185, 13),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "numDevices",
                             position: (185, 17),
                            },
                           ],
                          },
                          default: None,
                         },
                         PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (186, 13),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "algorithm",
                             position: (186, 17),
                            },
                           ],
                          },
                          default: None,
                         },
                         PropertyAccess {
                          expression: Variable {
                           identifier: "cfg",
                           position: (187, 13),
                          },
                          attribute_path: AttributePath {
                           attributes: [
                            Raw {
                             content: "memoryPercent",
                             position: (187, 17),
                            },
                           ],
                          },
                          default: None,
                         },
                        ],
                        position: (184, 29),
                       },
                      ),
                      KeyValue(
                       AttributePath {
                        attributes: [
                         Raw {
                          content: "restartIfChanged",
                          position: (189, 11),
                         },
                        ],
                       },
                       Variable {
                        identifier: "true",
                        position: (189, 30),
                       },
                      ),
                     ],
                     recursive: false,
                     position: (172, 9),
                    },
                   ],
                  },
                 ],
                 position: (171, 62),
                },
               ],
               position: (171, 59),
              },
             ],
            },
            position: (139, 7),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "swapDevices",
              position: (192, 5),
             },
            ],
           },
           LetIn {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "useZramSwap",
                 position: (194, 9),
                },
               ],
              },
              Function {
               argument: Some(
                "dev",
               ),
               arguments: FunctionArguments {
                arguments: [],
                ellipsis: false,
               },
               definition: Map {
                bindings: [
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "device",
                     position: (196, 13),
                    },
                   ],
                  },
                  String {
                   parts: [
                    Raw {
                     content: "/dev/",
                     position: (196, 23),
                    },
                    Expression {
                     expression: Variable {
                      identifier: "dev",
                      position: (196, 30),
                     },
                    },
                   ],
                  },
                 ),
                 KeyValue(
                  AttributePath {
                   attributes: [
                    Raw {
                     content: "priority",
                     position: (197, 13),
                    },
                   ],
                  },
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (197, 24),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "priority",
                      position: (197, 28),
                     },
                    ],
                   },
                   default: None,
                  },
                 ),
                ],
                recursive: false,
                position: (195, 11),
               },
               position: (194, 23),
              },
             ),
            ],
            target: FunctionApplication {
             function: Variable {
              identifier: "map",
              position: (199, 10),
             },
             arguments: [
              Variable {
               identifier: "useZramSwap",
               position: (199, 14),
              },
              Variable {
               identifier: "devices",
               position: (199, 26),
              },
             ],
            },
            position: (193, 7),
           },
          ),
         ],
         recursive: false,
         position: (118, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (32, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}