---
Function {
 argument: Destructured {
  identifier: None,
  arguments: [
   DestructuredArgument {
    identifier: "config",
    default: None,
   },
   DestructuredArgument {
    identifier: "lib",
    default: None,
   },
   DestructuredArgument {
    identifier: "pkgs",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "cfg",
        position: (7, 3),
       },
      ],
     },
     to: PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (7, 9),
      },
      attribute_path: AttributePath {
       parts: [
        Raw {
         content: "zramSwap",
         position: (7, 16),
        },
       ],
      },
      default: None,
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "devicesCount",
        position: (11, 3),
       },
      ],
     },
     to: IfThenElse {
      predicate: BinaryOperation {
       operator: NotEqualTo,
       operands: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (11, 21),
         },
         attribute_path: AttributePath {
          parts: [
           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 {
        parts: [
         Raw {
          content: "swapDevices",
          position: (11, 54),
         },
        ],
       },
       default: None,
      },
      else_: PropertyAccess {
       expression: Variable {
        identifier: "cfg",
        position: (11, 71),
       },
       attribute_path: AttributePath {
        parts: [
         Raw {
          content: "numDevices",
          position: (11, 75),
         },
        ],
       },
       default: None,
      },
      position: (11, 18),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "devices",
        position: (13, 3),
       },
      ],
     },
     to: FunctionApplication {
      function: Variable {
       identifier: "map",
       position: (13, 13),
      },
      arguments: [
       Parentheses {
        expression: Function {
         argument: Simple {
          identifier: "nr",
         },
         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, 22),
         },
         position: (13, 18),
        },
        position: (13, 17),
       },
       Parentheses {
        expression: FunctionApplication {
         function: Variable {
          identifier: "range",
          position: (13, 45),
         },
         arguments: [
          Int {
           value: 0,
           position: (13, 51),
          },
          Parentheses {
           expression: BinaryOperation {
            operator: Subtraction,
            operands: [
             Variable {
              identifier: "devicesCount",
              position: (13, 54),
             },
             Int {
              value: 1,
              position: (13, 69),
             },
            ],
            position: (13, 67),
           },
           position: (13, 53),
          },
         ],
        },
        position: (13, 44),
       },
      ],
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "modprobe",
        position: (15, 3),
       },
      ],
     },
     to: String {
      parts: [
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (15, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "kmod",
            position: (15, 22),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "/bin/modprobe",
        position: (15, 27),
       },
      ],
      position: (15, 14),
     },
    },
    Binding {
     from: AttributePath {
      parts: [
       Raw {
        content: "warnings",
        position: (17, 3),
       },
      ],
     },
     to: Assert {
      expression: BinaryOperation {
       operator: Implication,
       operands: [
        BinaryOperation {
         operator: NotEqualTo,
         operands: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (18, 10),
           },
           attribute_path: AttributePath {
            parts: [
             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 {
            parts: [
             Raw {
              content: "numDevices",
              position: (18, 41),
             },
            ],
           },
           default: None,
          },
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (18, 55),
           },
           attribute_path: AttributePath {
            parts: [
             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: [
          Parentheses {
           expression: FunctionApplication {
            function: Variable {
             identifier: "optional",
             position: (20, 6),
            },
            arguments: [
             Parentheses {
              expression: BinaryOperation {
               operator: LogicalAnd,
               operands: [
                BinaryOperation {
                 operator: GreaterThan,
                 operands: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (20, 16),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     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 {
                    parts: [
                     Raw {
                      content: "swapDevices",
                      position: (20, 42),
                     },
                    ],
                   },
                   default: None,
                  },
                  Variable {
                   identifier: "null",
                   position: (20, 57),
                  },
                 ],
                 position: (20, 54),
                },
               ],
               position: (20, 35),
              },
              position: (20, 15),
             },
             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: (20, 63),
             },
            ],
           },
           position: (20, 5),
          },
         ],
         position: (19, 11),
        },
       ],
      },
      position: (18, 3),
     },
    },
   ],
   target: Map {
    bindings: [
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "options",
         position: (36, 3),
        },
       ],
      },
      to: Map {
       bindings: [
        Binding {
         from: AttributePath {
          parts: [
           Raw {
            content: "zramSwap",
            position: (38, 5),
           },
          ],
         },
         to: Map {
          bindings: [
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "enable",
               position: (40, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (40, 16),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (41, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "false",
                  position: (41, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (42, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (42, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "bool",
                     position: (42, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (43, 9),
                   },
                  ],
                 },
                 to: 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),
                   },
                  ],
                  position: (43, 23),
                 },
                },
               ],
               recursive: false,
               position: (40, 25),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "numDevices",
               position: (52, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (52, 20),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (53, 9),
                   },
                  ],
                 },
                 to: Int {
                  value: 1,
                  position: (53, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (54, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (54, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "int",
                     position: (54, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (55, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Number of zram devices to create. See also\n<literal>zramSwap.swapDevices</literal>\n",
                    position: (56, 1),
                   },
                  ],
                  position: (55, 23),
                 },
                },
               ],
               recursive: false,
               position: (52, 29),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "swapDevices",
               position: (61, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (61, 21),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (62, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "null",
                  position: (62, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (63, 9),
                   },
                  ],
                 },
                 to: Int {
                  value: 1,
                  position: (63, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (64, 9),
                   },
                  ],
                 },
                 to: 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),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (65, 9),
                   },
                  ],
                 },
                 to: 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),
                   },
                  ],
                  position: (65, 23),
                 },
                },
               ],
               recursive: false,
               position: (61, 30),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "memoryPercent",
               position: (72, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (72, 23),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (73, 9),
                   },
                  ],
                 },
                 to: Int {
                  value: 50,
                  position: (73, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (74, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (74, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "int",
                     position: (74, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (75, 9),
                   },
                  ],
                 },
                 to: 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),
                   },
                  ],
                  position: (75, 23),
                 },
                },
               ],
               recursive: false,
               position: (72, 32),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "memoryMax",
               position: (83, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (83, 19),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (84, 9),
                   },
                  ],
                 },
                 to: Variable {
                  identifier: "null",
                  position: (84, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (85, 9),
                   },
                  ],
                 },
                 to: 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),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (86, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "Maximum total amount of memory (in bytes) that can be used by the zram\nswap devices.\n",
                    position: (87, 1),
                   },
                  ],
                  position: (86, 23),
                 },
                },
               ],
               recursive: false,
               position: (83, 28),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "priority",
               position: (92, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (92, 18),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (93, 9),
                   },
                  ],
                 },
                 to: Int {
                  value: 5,
                  position: (93, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (94, 9),
                   },
                  ],
                 },
                 to: PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (94, 16),
                  },
                  attribute_path: AttributePath {
                   parts: [
                    Raw {
                     content: "int",
                     position: (94, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (95, 9),
                   },
                  ],
                 },
                 to: 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),
                   },
                  ],
                  position: (95, 23),
                 },
                },
               ],
               recursive: false,
               position: (92, 27),
              },
             ],
            },
           },
           Binding {
            from: AttributePath {
             parts: [
              Raw {
               content: "algorithm",
               position: (102, 7),
              },
             ],
            },
            to: FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (102, 19),
             },
             arguments: [
              Map {
               bindings: [
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "default",
                    position: (103, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "zstd",
                    position: (103, 20),
                   },
                  ],
                  position: (103, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "example",
                    position: (104, 9),
                   },
                  ],
                 },
                 to: String {
                  parts: [
                   Raw {
                    content: "lz4",
                    position: (104, 20),
                   },
                  ],
                  position: (104, 19),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "type",
                    position: (105, 9),
                   },
                  ],
                 },
                 to: With {
                  expression: Variable {
                   identifier: "types",
                   position: (105, 21),
                  },
                  target: FunctionApplication {
                   function: Variable {
                    identifier: "either",
                    position: (105, 28),
                   },
                   arguments: [
                    Parentheses {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "enum",
                       position: (105, 36),
                      },
                      arguments: [
                       List {
                        elements: [
                         String {
                          parts: [
                           Raw {
                            content: "lzo",
                            position: (105, 44),
                           },
                          ],
                          position: (105, 43),
                         },
                         String {
                          parts: [
                           Raw {
                            content: "lz4",
                            position: (105, 50),
                           },
                          ],
                          position: (105, 49),
                         },
                         String {
                          parts: [
                           Raw {
                            content: "zstd",
                            position: (105, 56),
                           },
                          ],
                          position: (105, 55),
                         },
                        ],
                        position: (105, 41),
                       },
                      ],
                     },
                     position: (105, 35),
                    },
                    Variable {
                     identifier: "str",
                     position: (105, 65),
                    },
                   ],
                  },
                  position: (105, 16),
                 },
                },
                Binding {
                 from: AttributePath {
                  parts: [
                   Raw {
                    content: "description",
                    position: (106, 9),
                   },
                  ],
                 },
                 to: 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),
                   },
                  ],
                  position: (106, 23),
                 },
                },
               ],
               recursive: false,
               position: (102, 28),
              },
             ],
            },
           },
          ],
          recursive: false,
          position: (38, 16),
         },
        },
       ],
       recursive: false,
       position: (36, 13),
      },
     },
     Binding {
      from: AttributePath {
       parts: [
        Raw {
         content: "config",
         position: (118, 3),
        },
       ],
      },
      to: FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (118, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (118, 17),
         },
         attribute_path: AttributePath {
          parts: [
           Raw {
            content: "enable",
            position: (118, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          Inherit {
           from: None,
           attributes: [
            Raw {
             content: "warnings",
             position: (120, 13),
            },
           ],
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "system",
              position: (122, 5),
             },
             Raw {
              content: "requiredKernelConfig",
              position: (122, 12),
             },
            ],
           },
           to: With {
            expression: PropertyAccess {
             expression: Variable {
              identifier: "config",
              position: (122, 40),
             },
             attribute_path: AttributePath {
              parts: [
               Raw {
                content: "lib",
                position: (122, 47),
               },
               Raw {
                content: "kernelConfig",
                position: (122, 51),
               },
              ],
             },
             default: None,
            },
            target: List {
             elements: [
              Parentheses {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "isModule",
                 position: (123, 8),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: "ZRAM",
                    position: (123, 18),
                   },
                  ],
                  position: (123, 17),
                 },
                ],
               },
               position: (123, 7),
              },
             ],
             position: (122, 65),
            },
            position: (122, 35),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "boot",
              position: (130, 5),
             },
             Raw {
              content: "extraModprobeConfig",
              position: (130, 10),
             },
            ],
           },
           to: 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 {
                  parts: [
                   Raw {
                    content: "numDevices",
                    position: (131, 47),
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
             },
             Raw {
              content: "\n",
              position: (131, 58),
             },
            ],
            position: (130, 32),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "services",
              position: (134, 5),
             },
             Raw {
              content: "udev",
              position: (134, 14),
             },
             Raw {
              content: "extraRules",
              position: (134, 19),
             },
            ],
           },
           to: String {
            parts: [
             Raw {
              content: "KERNEL==\"zram[0-9]*\", ENV{SYSTEMD_WANTS}=\"zram-init-%k.service\", TAG+=\"systemd\"\n",
              position: (135, 1),
             },
            ],
            position: (134, 32),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "systemd",
              position: (138, 5),
             },
             Raw {
              content: "services",
              position: (138, 13),
             },
            ],
           },
           to: LetIn {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "createZramInitService",
                 position: (140, 9),
                },
               ],
              },
              to: Function {
               argument: Simple {
                identifier: "dev",
               },
               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),
                    },
                   },
                  ],
                  position: (141, 25),
                 },
                 Map {
                  bindings: [
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "description",
                       position: (142, 13),
                      },
                     ],
                    },
                    to: String {
                     parts: [
                      Raw {
                       content: "Init swap on zram-based device ",
                       position: (142, 28),
                      },
                      Expression {
                       expression: Variable {
                        identifier: "dev",
                        position: (142, 61),
                       },
                      },
                     ],
                     position: (142, 27),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "after",
                       position: (143, 13),
                      },
                     ],
                    },
                    to: List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "dev-",
                         position: (143, 24),
                        },
                        Expression {
                         expression: Variable {
                          identifier: "dev",
                          position: (143, 30),
                         },
                        },
                        Raw {
                         content: ".device",
                         position: (143, 34),
                        },
                       ],
                       position: (143, 23),
                      },
                      String {
                       parts: [
                        Raw {
                         content: "zram-reloader.service",
                         position: (143, 44),
                        },
                       ],
                       position: (143, 43),
                      },
                     ],
                     position: (143, 21),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "requires",
                       position: (144, 13),
                      },
                     ],
                    },
                    to: List {
                     elements: [
                      String {
                       parts: [
                        Raw {
                         content: "dev-",
                         position: (144, 27),
                        },
                        Expression {
                         expression: Variable {
                          identifier: "dev",
                          position: (144, 33),
                         },
                        },
                        Raw {
                         content: ".device",
                         position: (144, 37),
                        },
                       ],
                       position: (144, 26),
                      },
                      String {
                       parts: [
                        Raw {
                         content: "zram-reloader.service",
                         position: (144, 47),
                        },
                       ],
                       position: (144, 46),
                      },
                     ],
                     position: (144, 24),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "before",
                       position: (145, 13),
                      },
                     ],
                    },
                    to: 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, 24),
                      },
                     ],
                     position: (145, 22),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "requiredBy",
                       position: (146, 13),
                      },
                     ],
                    },
                    to: 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, 28),
                      },
                     ],
                     position: (146, 26),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "unitConfig",
                       position: (147, 13),
                      },
                      Raw {
                       content: "DefaultDependencies",
                       position: (147, 24),
                      },
                     ],
                    },
                    to: Variable {
                     identifier: "false",
                     position: (147, 46),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "serviceConfig",
                       position: (148, 13),
                      },
                     ],
                    },
                    to: Map {
                     bindings: [
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "Type",
                          position: (149, 15),
                         },
                        ],
                       },
                       to: String {
                        parts: [
                         Raw {
                          content: "oneshot",
                          position: (149, 23),
                         },
                        ],
                        position: (149, 22),
                       },
                      },
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "RemainAfterExit",
                          position: (150, 15),
                         },
                        ],
                       },
                       to: Variable {
                        identifier: "true",
                        position: (150, 33),
                       },
                      },
                      Binding {
                       from: AttributePath {
                        parts: [
                         Raw {
                          content: "ExecStop",
                          position: (151, 15),
                         },
                        ],
                       },
                       to: String {
                        parts: [
                         Expression {
                          expression: PropertyAccess {
                           expression: Variable {
                            identifier: "pkgs",
                            position: (151, 29),
                           },
                           attribute_path: AttributePath {
                            parts: [
                             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),
                         },
                        ],
                        position: (151, 26),
                       },
                      },
                     ],
                     recursive: false,
                     position: (148, 29),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "script",
                       position: (153, 13),
                      },
                     ],
                    },
                    to: 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 {
                         parts: [
                          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 {
                           parts: [
                            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 {
                          parts: [
                           Raw {
                            content: "optionalString",
                            position: (159, 27),
                           },
                          ],
                         },
                         default: None,
                        },
                        arguments: [
                         Parentheses {
                          expression: BinaryOperation {
                           operator: NotEqualTo,
                           operands: [
                            PropertyAccess {
                             expression: Variable {
                              identifier: "cfg",
                              position: (159, 43),
                             },
                             attribute_path: AttributePath {
                              parts: [
                               Raw {
                                content: "memoryMax",
                                position: (159, 47),
                               },
                              ],
                             },
                             default: None,
                            },
                            Variable {
                             identifier: "null",
                             position: (159, 60),
                            },
                           ],
                           position: (159, 57),
                          },
                          position: (159, 42),
                         },
                         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 {
                                parts: [
                                 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),
                           },
                          ],
                          position: (159, 66),
                         },
                        ],
                       },
                      },
                      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 {
                         parts: [
                          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 {
                         parts: [
                          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 {
                         parts: [
                          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),
                      },
                     ],
                     position: (153, 22),
                    },
                   },
                   Binding {
                    from: AttributePath {
                     parts: [
                      Raw {
                       content: "restartIfChanged",
                       position: (169, 13),
                      },
                     ],
                    },
                    to: Variable {
                     identifier: "false",
                     position: (169, 32),
                    },
                   },
                  ],
                  recursive: false,
                  position: (141, 44),
                 },
                ],
               },
               position: (140, 33),
              },
             },
            ],
            target: FunctionApplication {
             function: Variable {
              identifier: "listToAttrs",
              position: (171, 10),
             },
             arguments: [
              Parentheses {
               expression: BinaryOperation {
                operator: Concatenation,
                operands: [
                 Parentheses {
                  expression: FunctionApplication {
                   function: Variable {
                    identifier: "map",
                    position: (171, 24),
                   },
                   arguments: [
                    Variable {
                     identifier: "createZramInitService",
                     position: (171, 28),
                    },
                    Variable {
                     identifier: "devices",
                     position: (171, 50),
                    },
                   ],
                  },
                  position: (171, 23),
                 },
                 List {
                  elements: [
                   Parentheses {
                    expression: FunctionApplication {
                     function: Variable {
                      identifier: "nameValuePair",
                      position: (171, 64),
                     },
                     arguments: [
                      String {
                       parts: [
                        Raw {
                         content: "zram-reloader",
                         position: (171, 79),
                        },
                       ],
                       position: (171, 78),
                      },
                      Map {
                       bindings: [
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "description",
                            position: (173, 11),
                           },
                          ],
                         },
                         to: String {
                          parts: [
                           Raw {
                            content: "Reload zram kernel module when number of devices changes",
                            position: (173, 26),
                           },
                          ],
                          position: (173, 25),
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "wants",
                            position: (174, 11),
                           },
                          ],
                         },
                         to: List {
                          elements: [
                           String {
                            parts: [
                             Raw {
                              content: "systemd-udevd.service",
                              position: (174, 22),
                             },
                            ],
                            position: (174, 21),
                           },
                          ],
                          position: (174, 19),
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "after",
                            position: (175, 11),
                           },
                          ],
                         },
                         to: List {
                          elements: [
                           String {
                            parts: [
                             Raw {
                              content: "systemd-udevd.service",
                              position: (175, 22),
                             },
                            ],
                            position: (175, 21),
                           },
                          ],
                          position: (175, 19),
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "unitConfig",
                            position: (176, 11),
                           },
                           Raw {
                            content: "DefaultDependencies",
                            position: (176, 22),
                           },
                          ],
                         },
                         to: Variable {
                          identifier: "false",
                          position: (176, 44),
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "serviceConfig",
                            position: (177, 11),
                           },
                          ],
                         },
                         to: Map {
                          bindings: [
                           Binding {
                            from: AttributePath {
                             parts: [
                              Raw {
                               content: "Type",
                               position: (178, 13),
                              },
                             ],
                            },
                            to: String {
                             parts: [
                              Raw {
                               content: "oneshot",
                               position: (178, 21),
                              },
                             ],
                             position: (178, 20),
                            },
                           },
                           Binding {
                            from: AttributePath {
                             parts: [
                              Raw {
                               content: "RemainAfterExit",
                               position: (179, 13),
                              },
                             ],
                            },
                            to: Variable {
                             identifier: "true",
                             position: (179, 31),
                            },
                           },
                           Binding {
                            from: AttributePath {
                             parts: [
                              Raw {
                               content: "ExecStartPre",
                               position: (180, 13),
                              },
                             ],
                            },
                            to: String {
                             parts: [
                              Expression {
                               expression: Variable {
                                identifier: "modprobe",
                                position: (180, 31),
                               },
                              },
                              Raw {
                               content: " -r zram",
                               position: (180, 40),
                              },
                             ],
                             position: (180, 28),
                            },
                           },
                           Binding {
                            from: AttributePath {
                             parts: [
                              Raw {
                               content: "ExecStart",
                               position: (181, 13),
                              },
                             ],
                            },
                            to: String {
                             parts: [
                              Expression {
                               expression: Variable {
                                identifier: "modprobe",
                                position: (181, 28),
                               },
                              },
                              Raw {
                               content: " zram",
                               position: (181, 37),
                              },
                             ],
                             position: (181, 25),
                            },
                           },
                           Binding {
                            from: AttributePath {
                             parts: [
                              Raw {
                               content: "ExecStop",
                               position: (182, 13),
                              },
                             ],
                            },
                            to: String {
                             parts: [
                              Expression {
                               expression: Variable {
                                identifier: "modprobe",
                                position: (182, 27),
                               },
                              },
                              Raw {
                               content: " -r zram",
                               position: (182, 36),
                              },
                             ],
                             position: (182, 24),
                            },
                           },
                          ],
                          recursive: false,
                          position: (177, 27),
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "restartTriggers",
                            position: (184, 11),
                           },
                          ],
                         },
                         to: List {
                          elements: [
                           PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (185, 13),
                            },
                            attribute_path: AttributePath {
                             parts: [
                              Raw {
                               content: "numDevices",
                               position: (185, 17),
                              },
                             ],
                            },
                            default: None,
                           },
                           PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (186, 13),
                            },
                            attribute_path: AttributePath {
                             parts: [
                              Raw {
                               content: "algorithm",
                               position: (186, 17),
                              },
                             ],
                            },
                            default: None,
                           },
                           PropertyAccess {
                            expression: Variable {
                             identifier: "cfg",
                             position: (187, 13),
                            },
                            attribute_path: AttributePath {
                             parts: [
                              Raw {
                               content: "memoryPercent",
                               position: (187, 17),
                              },
                             ],
                            },
                            default: None,
                           },
                          ],
                          position: (184, 29),
                         },
                        },
                        Binding {
                         from: AttributePath {
                          parts: [
                           Raw {
                            content: "restartIfChanged",
                            position: (189, 11),
                           },
                          ],
                         },
                         to: Variable {
                          identifier: "true",
                          position: (189, 30),
                         },
                        },
                       ],
                       recursive: false,
                       position: (172, 9),
                      },
                     ],
                    },
                    position: (171, 63),
                   },
                  ],
                  position: (171, 62),
                 },
                ],
                position: (171, 59),
               },
               position: (171, 22),
              },
             ],
            },
            position: (139, 7),
           },
          },
          Binding {
           from: AttributePath {
            parts: [
             Raw {
              content: "swapDevices",
              position: (192, 5),
             },
            ],
           },
           to: LetIn {
            bindings: [
             Binding {
              from: AttributePath {
               parts: [
                Raw {
                 content: "useZramSwap",
                 position: (194, 9),
                },
               ],
              },
              to: Function {
               argument: Simple {
                identifier: "dev",
               },
               definition: Map {
                bindings: [
                 Binding {
                  from: AttributePath {
                   parts: [
                    Raw {
                     content: "device",
                     position: (196, 13),
                    },
                   ],
                  },
                  to: String {
                   parts: [
                    Raw {
                     content: "/dev/",
                     position: (196, 23),
                    },
                    Expression {
                     expression: Variable {
                      identifier: "dev",
                      position: (196, 30),
                     },
                    },
                   ],
                   position: (196, 22),
                  },
                 },
                 Binding {
                  from: AttributePath {
                   parts: [
                    Raw {
                     content: "priority",
                     position: (197, 13),
                    },
                   ],
                  },
                  to: PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (197, 24),
                   },
                   attribute_path: AttributePath {
                    parts: [
                     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),
}