---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: false,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "systemd",
         position: (6, 16),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "lndir",
        position: (7, 3),
       },
      ],
     },
     String {
      parts: [
       Expression {
        expression: PropertyAccess {
         expression: Variable {
          identifier: "pkgs",
          position: (7, 14),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "buildPackages",
            position: (7, 19),
           },
           Raw {
            content: "xorg",
            position: (7, 33),
           },
           Raw {
            content: "lndir",
            position: (7, 38),
           },
          ],
         },
         default: None,
        },
       },
       Raw {
        content: "/bin/lndir",
        position: (7, 44),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "shellEscape",
         position: (10, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "s",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: FunctionApplication {
        function: Variable {
         identifier: "replaceChars",
         position: (10, 21),
        },
        arguments: [
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "\\",
              position: (10, 37),
             },
            ],
           },
          ],
          position: (10, 34),
         },
         List {
          elements: [
           String {
            parts: [
             Raw {
              content: "\\\\",
              position: (10, 46),
             },
            ],
           },
          ],
          position: (10, 43),
         },
         Variable {
          identifier: "s",
          position: (10, 54),
         },
        ],
       },
       position: (10, 17),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "mkPathSafeName",
         position: (12, 3),
        },
       ],
      },
      FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "lib",
         position: (12, 20),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "replaceChars",
           position: (12, 24),
          },
         ],
        },
        default: None,
       },
       arguments: [
        List {
         elements: [
          String {
           parts: [
            Raw {
             content: "@",
             position: (12, 39),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: ":",
             position: (12, 43),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "\\",
             position: (12, 47),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "[",
             position: (12, 52),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "]",
             position: (12, 56),
            },
           ],
          },
         ],
         position: (12, 37),
        },
        List {
         elements: [
          String {
           parts: [
            Raw {
             content: "-",
             position: (12, 62),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "-",
             position: (12, 66),
            },
           ],
          },
          String {
           parts: [
            Raw {
             content: "-",
             position: (12, 70),
            },
           ],
          },
          String {
           parts: [],
          },
          String {
           parts: [],
          },
         ],
         position: (12, 60),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "unitNameType",
         position: (15, 3),
        },
       ],
      },
      FunctionApplication {
       function: PropertyAccess {
        expression: Variable {
         identifier: "types",
         position: (15, 18),
        },
        attribute_path: AttributePath {
         attributes: [
          Raw {
           content: "strMatching",
           position: (15, 24),
          },
         ],
        },
        default: None,
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: "[a-zA-Z0-9@%:_.\\-]+[.](service|socket|device|mount|automount|swap|target|path|timer|scope|slice)",
           position: (15, 37),
          },
         ],
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "makeUnit",
         position: (17, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "unit",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: IfThenElse {
         predicate: PropertyAccess {
          expression: Variable {
           identifier: "unit",
           position: (18, 8),
          },
          attribute_path: AttributePath {
           attributes: [
            Raw {
             content: "enable",
             position: (18, 13),
            },
           ],
          },
          default: None,
         },
         then: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "pkgs",
            position: (19, 7),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "runCommand",
              position: (19, 12),
             },
            ],
           },
           default: None,
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "unit-",
              position: (19, 24),
             },
             Expression {
              expression: FunctionApplication {
               function: Variable {
                identifier: "mkPathSafeName",
                position: (19, 31),
               },
               arguments: [
                Variable {
                 identifier: "name",
                 position: (19, 46),
                },
               ],
              },
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "preferLocalBuild",
                 position: (20, 11),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (20, 30),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "allowSubstitutes",
                 position: (21, 11),
                },
               ],
              },
              Variable {
               identifier: "false",
               position: (21, 30),
              },
             ),
             Inherit(
              Some(
               Variable {
                identifier: "unit",
                position: (22, 20),
               },
              ),
              [
               Raw {
                content: "text",
                position: (22, 26),
               },
              ],
             ),
            ],
            recursive: false,
            position: (20, 9),
           },
           String {
            parts: [
             Raw {
              content: "mkdir -p $out\necho -n \"$text\" > $out/",
              position: (25, 1),
             },
             Expression {
              expression: FunctionApplication {
               function: Variable {
                identifier: "shellEscape",
                position: (26, 36),
               },
               arguments: [
                Variable {
                 identifier: "name",
                 position: (26, 48),
                },
               ],
              },
             },
             Raw {
              content: "\n",
              position: (26, 53),
             },
            ],
           },
          ],
         },
         else_: FunctionApplication {
          function: PropertyAccess {
           expression: Variable {
            identifier: "pkgs",
            position: (29, 7),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "runCommand",
              position: (29, 12),
             },
            ],
           },
           default: None,
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "unit-",
              position: (29, 24),
             },
             Expression {
              expression: FunctionApplication {
               function: Variable {
                identifier: "mkPathSafeName",
                position: (29, 31),
               },
               arguments: [
                Variable {
                 identifier: "name",
                 position: (29, 46),
                },
               ],
              },
             },
             Raw {
              content: "-disabled",
              position: (29, 51),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "preferLocalBuild",
                 position: (30, 11),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (30, 30),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "allowSubstitutes",
                 position: (31, 11),
                },
               ],
              },
              Variable {
               identifier: "false",
               position: (31, 30),
              },
             ),
            ],
            recursive: false,
            position: (30, 9),
           },
           String {
            parts: [
             Raw {
              content: "mkdir -p $out\nln -s /dev/null $out/",
              position: (34, 1),
             },
             Expression {
              expression: FunctionApplication {
               function: Variable {
                identifier: "shellEscape",
                position: (35, 34),
               },
               arguments: [
                Variable {
                 identifier: "name",
                 position: (35, 46),
                },
               ],
              },
             },
             Raw {
              content: "\n",
              position: (35, 51),
             },
            ],
           },
          ],
         },
         position: (18, 5),
        },
        position: (17, 20),
       },
       position: (17, 14),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "boolValues",
         position: (38, 3),
        },
       ],
      },
      List {
       elements: [
        Variable {
         identifier: "true",
         position: (38, 17),
        },
        Variable {
         identifier: "false",
         position: (38, 22),
        },
        String {
         parts: [
          Raw {
           content: "yes",
           position: (38, 29),
          },
         ],
        },
        String {
         parts: [
          Raw {
           content: "no",
           position: (38, 35),
          },
         ],
        },
       ],
       position: (38, 16),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "digits",
         position: (40, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "map",
        position: (40, 12),
       },
       arguments: [
        Variable {
         identifier: "toString",
         position: (40, 16),
        },
        FunctionApplication {
         function: Variable {
          identifier: "range",
          position: (40, 26),
         },
         arguments: [
          Int {
           value: 0,
           position: (40, 32),
          },
          Int {
           value: 9,
           position: (40, 34),
          },
         ],
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "isByteFormat",
         position: (42, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "s",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: LetIn {
        bindings: [
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "l",
             position: (44, 7),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "reverseList",
            position: (44, 11),
           },
           arguments: [
            FunctionApplication {
             function: Variable {
              identifier: "stringToCharacters",
              position: (44, 24),
             },
             arguments: [
              Variable {
               identifier: "s",
               position: (44, 43),
              },
             ],
            },
           ],
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "suffix",
             position: (45, 7),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "head",
            position: (45, 16),
           },
           arguments: [
            Variable {
             identifier: "l",
             position: (45, 21),
            },
           ],
          },
         ),
         KeyValue(
          AttributePath {
           attributes: [
            Raw {
             content: "nums",
             position: (46, 7),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "tail",
            position: (46, 14),
           },
           arguments: [
            Variable {
             identifier: "l",
             position: (46, 19),
            },
           ],
          },
         ),
        ],
        target: BinaryOperation {
         operator: LogicalAnd,
         operands: [
          FunctionApplication {
           function: Variable {
            identifier: "elem",
            position: (47, 8),
           },
           arguments: [
            Variable {
             identifier: "suffix",
             position: (47, 13),
            },
            BinaryOperation {
             operator: Concatenation,
             operands: [
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "K",
                   position: (47, 23),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "M",
                   position: (47, 27),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "G",
                   position: (47, 31),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "T",
                   position: (47, 35),
                  },
                 ],
                },
               ],
               position: (47, 21),
              },
              Variable {
               identifier: "digits",
               position: (47, 42),
              },
             ],
             position: (47, 39),
            },
           ],
          },
          FunctionApplication {
           function: Variable {
            identifier: "all",
            position: (48, 10),
           },
           arguments: [
            Function {
             argument: Some(
              "num",
             ),
             arguments: FunctionArguments {
              arguments: [],
              ellipsis: false,
             },
             definition: FunctionApplication {
              function: Variable {
               identifier: "elem",
               position: (48, 20),
              },
              arguments: [
               Variable {
                identifier: "num",
                position: (48, 25),
               },
               Variable {
                identifier: "digits",
                position: (48, 29),
               },
              ],
             },
             position: (48, 15),
            },
            Variable {
             identifier: "nums",
             position: (48, 37),
            },
           ],
          },
         ],
         position: (48, 7),
        },
        position: (43, 5),
       },
       position: (42, 18),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertByteFormat",
         position: (50, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "group",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "attr",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: FunctionApplication {
          function: Variable {
           identifier: "optional",
           position: (51, 5),
          },
          arguments: [
           BinaryOperation {
            operator: LogicalAnd,
            operands: [
             HasProperty {
              expression: Variable {
               identifier: "attr",
               position: (51, 15),
              },
              attribute_path: AttributePath {
               attributes: [
                Expression {
                 expression: Variable {
                  identifier: "name",
                  position: (51, 24),
                 },
                },
               ],
              },
              position: (51, 20),
             },
             UnaryOperation {
              operator: Not,
              operand: FunctionApplication {
               function: Variable {
                identifier: "isByteFormat",
                position: (51, 35),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "attr",
                  position: (51, 48),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Expression {
                    expression: Variable {
                     identifier: "name",
                     position: (51, 55),
                    },
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
              position: (51, 33),
             },
            ],
            position: (51, 30),
           },
           String {
            parts: [
             Raw {
              content: "Systemd ",
              position: (52, 8),
             },
             Expression {
              expression: Variable {
               identifier: "group",
               position: (52, 18),
              },
             },
             Raw {
              content: " field `",
              position: (52, 24),
             },
             Expression {
              expression: Variable {
               identifier: "name",
               position: (52, 34),
              },
             },
             Raw {
              content: "' must be in byte format [0-9]+[KMGT].",
              position: (52, 39),
             },
            ],
           },
          ],
         },
         position: (50, 35),
        },
        position: (50, 28),
       },
       position: (50, 22),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "hexChars",
         position: (54, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "stringToCharacters",
        position: (54, 14),
       },
       arguments: [
        String {
         parts: [
          Raw {
           content: "0123456789abcdefABCDEF",
           position: (54, 34),
          },
         ],
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "isMacAddress",
         position: (56, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "s",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: BinaryOperation {
        operator: LogicalAnd,
        operands: [
         BinaryOperation {
          operator: EqualTo,
          operands: [
           FunctionApplication {
            function: Variable {
             identifier: "stringLength",
             position: (56, 21),
            },
            arguments: [
             Variable {
              identifier: "s",
              position: (56, 34),
             },
            ],
           },
           Int {
            value: 17,
            position: (56, 39),
           },
          ],
          position: (56, 36),
         },
         FunctionApplication {
          function: Variable {
           identifier: "flip",
           position: (57, 8),
          },
          arguments: [
           Variable {
            identifier: "all",
            position: (57, 13),
           },
           FunctionApplication {
            function: Variable {
             identifier: "splitString",
             position: (57, 18),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: ":",
                position: (57, 31),
               },
              ],
             },
             Variable {
              identifier: "s",
              position: (57, 34),
             },
            ],
           },
           Function {
            argument: Some(
             "bytes",
            ),
            arguments: FunctionArguments {
             arguments: [],
             ellipsis: false,
            },
            definition: FunctionApplication {
             function: Variable {
              identifier: "all",
              position: (58, 7),
             },
             arguments: [
              Function {
               argument: Some(
                "byte",
               ),
               arguments: FunctionArguments {
                arguments: [],
                ellipsis: false,
               },
               definition: FunctionApplication {
                function: Variable {
                 identifier: "elem",
                 position: (58, 18),
                },
                arguments: [
                 Variable {
                  identifier: "byte",
                  position: (58, 23),
                 },
                 Variable {
                  identifier: "hexChars",
                  position: (58, 28),
                 },
                ],
               },
               position: (58, 12),
              },
              FunctionApplication {
               function: Variable {
                identifier: "stringToCharacters",
                position: (58, 39),
               },
               arguments: [
                Variable {
                 identifier: "bytes",
                 position: (58, 58),
                },
               ],
              },
             ],
            },
            position: (57, 38),
           },
          ],
         },
        ],
        position: (57, 5),
       },
       position: (56, 18),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertMacAddress",
         position: (61, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "group",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "attr",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: FunctionApplication {
          function: Variable {
           identifier: "optional",
           position: (62, 5),
          },
          arguments: [
           BinaryOperation {
            operator: LogicalAnd,
            operands: [
             HasProperty {
              expression: Variable {
               identifier: "attr",
               position: (62, 15),
              },
              attribute_path: AttributePath {
               attributes: [
                Expression {
                 expression: Variable {
                  identifier: "name",
                  position: (62, 24),
                 },
                },
               ],
              },
              position: (62, 20),
             },
             UnaryOperation {
              operator: Not,
              operand: FunctionApplication {
               function: Variable {
                identifier: "isMacAddress",
                position: (62, 35),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "attr",
                  position: (62, 48),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Expression {
                    expression: Variable {
                     identifier: "name",
                     position: (62, 55),
                    },
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
              position: (62, 33),
             },
            ],
            position: (62, 30),
           },
           String {
            parts: [
             Raw {
              content: "Systemd ",
              position: (63, 8),
             },
             Expression {
              expression: Variable {
               identifier: "group",
               position: (63, 18),
              },
             },
             Raw {
              content: " field `",
              position: (63, 24),
             },
             Expression {
              expression: Variable {
               identifier: "name",
               position: (63, 34),
              },
             },
             Raw {
              content: "' must be a valid mac address.",
              position: (63, 39),
             },
            ],
           },
          ],
         },
         position: (61, 35),
        },
        position: (61, 28),
       },
       position: (61, 22),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "isPort",
         position: (65, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "i",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: BinaryOperation {
        operator: LogicalAnd,
        operands: [
         BinaryOperation {
          operator: GreaterThanOrEqualTo,
          operands: [
           Variable {
            identifier: "i",
            position: (65, 15),
           },
           Int {
            value: 0,
            position: (65, 20),
           },
          ],
          position: (65, 17),
         },
         BinaryOperation {
          operator: LessThanOrEqualTo,
          operands: [
           Variable {
            identifier: "i",
            position: (65, 25),
           },
           Int {
            value: 65535,
            position: (65, 30),
           },
          ],
          position: (65, 27),
         },
        ],
        position: (65, 22),
       },
       position: (65, 12),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertPort",
         position: (67, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "group",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "attr",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: FunctionApplication {
          function: Variable {
           identifier: "optional",
           position: (68, 5),
          },
          arguments: [
           BinaryOperation {
            operator: LogicalAnd,
            operands: [
             HasProperty {
              expression: Variable {
               identifier: "attr",
               position: (68, 15),
              },
              attribute_path: AttributePath {
               attributes: [
                Expression {
                 expression: Variable {
                  identifier: "name",
                  position: (68, 24),
                 },
                },
               ],
              },
              position: (68, 20),
             },
             UnaryOperation {
              operator: Not,
              operand: FunctionApplication {
               function: Variable {
                identifier: "isPort",
                position: (68, 35),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "attr",
                  position: (68, 42),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Expression {
                    expression: Variable {
                     identifier: "name",
                     position: (68, 49),
                    },
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
              position: (68, 33),
             },
            ],
            position: (68, 30),
           },
           String {
            parts: [
             Raw {
              content: "Error on the systemd ",
              position: (69, 8),
             },
             Expression {
              expression: Variable {
               identifier: "group",
               position: (69, 31),
              },
             },
             Raw {
              content: " field `",
              position: (69, 37),
             },
             Expression {
              expression: Variable {
               identifier: "name",
               position: (69, 47),
              },
             },
             Raw {
              content: "': ",
              position: (69, 52),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "attr",
                position: (69, 57),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "name",
                  position: (69, 62),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: " is not a valid port number.",
              position: (69, 67),
             },
            ],
           },
          ],
         },
         position: (67, 29),
        },
        position: (67, 22),
       },
       position: (67, 16),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertValueOneOf",
         position: (71, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "values",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "group",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: Function {
          argument: Some(
           "attr",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: FunctionApplication {
           function: Variable {
            identifier: "optional",
            position: (72, 5),
           },
           arguments: [
            BinaryOperation {
             operator: LogicalAnd,
             operands: [
              HasProperty {
               expression: Variable {
                identifier: "attr",
                position: (72, 15),
               },
               attribute_path: AttributePath {
                attributes: [
                 Expression {
                  expression: Variable {
                   identifier: "name",
                   position: (72, 24),
                  },
                 },
                ],
               },
               position: (72, 20),
              },
              UnaryOperation {
               operator: Not,
               operand: FunctionApplication {
                function: Variable {
                 identifier: "elem",
                 position: (72, 34),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "attr",
                   position: (72, 39),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Expression {
                     expression: Variable {
                      identifier: "name",
                      position: (72, 46),
                     },
                    },
                   ],
                  },
                  default: None,
                 },
                 Variable {
                  identifier: "values",
                  position: (72, 52),
                 },
                ],
               },
               position: (72, 33),
              },
             ],
             position: (72, 30),
            },
            String {
             parts: [
              Raw {
               content: "Systemd ",
               position: (73, 8),
              },
              Expression {
               expression: Variable {
                identifier: "group",
                position: (73, 18),
               },
              },
              Raw {
               content: " field `",
               position: (73, 24),
              },
              Expression {
               expression: Variable {
                identifier: "name",
                position: (73, 34),
               },
              },
              Raw {
               content: "' cannot have value `",
               position: (73, 39),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (73, 62),
                },
                arguments: [
                 PropertyAccess {
                  expression: Variable {
                   identifier: "attr",
                   position: (73, 71),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Expression {
                     expression: Variable {
                      identifier: "name",
                      position: (73, 78),
                     },
                    },
                   ],
                  },
                  default: None,
                 },
                ],
               },
              },
              Raw {
               content: "'.",
               position: (73, 84),
              },
             ],
            },
           ],
          },
          position: (71, 43),
         },
         position: (71, 36),
        },
        position: (71, 28),
       },
       position: (71, 22),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertHasField",
         position: (75, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "group",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "attr",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: FunctionApplication {
          function: Variable {
           identifier: "optional",
           position: (76, 5),
          },
          arguments: [
           UnaryOperation {
            operator: Not,
            operand: HasProperty {
             expression: Variable {
              identifier: "attr",
              position: (76, 17),
             },
             attribute_path: AttributePath {
              attributes: [
               Expression {
                expression: Variable {
                 identifier: "name",
                 position: (76, 26),
                },
               },
              ],
             },
             position: (76, 22),
            },
            position: (76, 15),
           },
           String {
            parts: [
             Raw {
              content: "Systemd ",
              position: (77, 8),
             },
             Expression {
              expression: Variable {
               identifier: "group",
               position: (77, 18),
              },
             },
             Raw {
              content: " field `",
              position: (77, 24),
             },
             Expression {
              expression: Variable {
               identifier: "name",
               position: (77, 34),
              },
             },
             Raw {
              content: "' must exist.",
              position: (77, 39),
             },
            ],
           },
          ],
         },
         position: (75, 33),
        },
        position: (75, 26),
       },
       position: (75, 20),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertRange",
         position: (79, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "min",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "max",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: Function {
          argument: Some(
           "group",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: Function {
           argument: Some(
            "attr",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: FunctionApplication {
            function: Variable {
             identifier: "optional",
             position: (80, 5),
            },
            arguments: [
             BinaryOperation {
              operator: LogicalAnd,
              operands: [
               HasProperty {
                expression: Variable {
                 identifier: "attr",
                 position: (80, 15),
                },
                attribute_path: AttributePath {
                 attributes: [
                  Expression {
                   expression: Variable {
                    identifier: "name",
                    position: (80, 24),
                   },
                  },
                 ],
                },
                position: (80, 20),
               },
               UnaryOperation {
                operator: Not,
                operand: BinaryOperation {
                 operator: LogicalAnd,
                 operands: [
                  BinaryOperation {
                   operator: LessThanOrEqualTo,
                   operands: [
                    Variable {
                     identifier: "min",
                     position: (80, 35),
                    },
                    PropertyAccess {
                     expression: Variable {
                      identifier: "attr",
                      position: (80, 42),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Expression {
                        expression: Variable {
                         identifier: "name",
                         position: (80, 49),
                        },
                       },
                      ],
                     },
                     default: None,
                    },
                   ],
                   position: (80, 39),
                  },
                  BinaryOperation {
                   operator: GreaterThanOrEqualTo,
                   operands: [
                    Variable {
                     identifier: "max",
                     position: (80, 58),
                    },
                    PropertyAccess {
                     expression: Variable {
                      identifier: "attr",
                      position: (80, 65),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Expression {
                        expression: Variable {
                         identifier: "name",
                         position: (80, 72),
                        },
                       },
                      ],
                     },
                     default: None,
                    },
                   ],
                   position: (80, 62),
                  },
                 ],
                 position: (80, 55),
                },
                position: (80, 33),
               },
              ],
              position: (80, 30),
             },
             String {
              parts: [
               Raw {
                content: "Systemd ",
                position: (81, 8),
               },
               Expression {
                expression: Variable {
                 identifier: "group",
                 position: (81, 18),
                },
               },
               Raw {
                content: " field `",
                position: (81, 24),
               },
               Expression {
                expression: Variable {
                 identifier: "name",
                 position: (81, 34),
                },
               },
               Raw {
                content: "' is outside the range [",
                position: (81, 39),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (81, 65),
                 },
                 arguments: [
                  Variable {
                   identifier: "min",
                   position: (81, 74),
                  },
                 ],
                },
               },
               Raw {
                content: ",",
                position: (81, 78),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (81, 81),
                 },
                 arguments: [
                  Variable {
                   identifier: "max",
                   position: (81, 90),
                  },
                 ],
                },
               },
               Raw {
                content: "]",
                position: (81, 94),
               },
              ],
             },
            ],
           },
           position: (79, 40),
          },
          position: (79, 33),
         },
         position: (79, 28),
        },
        position: (79, 23),
       },
       position: (79, 17),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertMinimum",
         position: (83, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "min",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "group",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: Function {
          argument: Some(
           "attr",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: FunctionApplication {
           function: Variable {
            identifier: "optional",
            position: (84, 5),
           },
           arguments: [
            BinaryOperation {
             operator: LogicalAnd,
             operands: [
              HasProperty {
               expression: Variable {
                identifier: "attr",
                position: (84, 15),
               },
               attribute_path: AttributePath {
                attributes: [
                 Expression {
                  expression: Variable {
                   identifier: "name",
                   position: (84, 24),
                  },
                 },
                ],
               },
               position: (84, 20),
              },
              BinaryOperation {
               operator: LessThan,
               operands: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "attr",
                  position: (84, 33),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Expression {
                    expression: Variable {
                     identifier: "name",
                     position: (84, 40),
                    },
                   },
                  ],
                 },
                 default: None,
                },
                Variable {
                 identifier: "min",
                 position: (84, 48),
                },
               ],
               position: (84, 46),
              },
             ],
             position: (84, 30),
            },
            String {
             parts: [
              Raw {
               content: "Systemd ",
               position: (85, 8),
              },
              Expression {
               expression: Variable {
                identifier: "group",
                position: (85, 18),
               },
              },
              Raw {
               content: " field `",
               position: (85, 24),
              },
              Expression {
               expression: Variable {
                identifier: "name",
                position: (85, 34),
               },
              },
              Raw {
               content: "' must be greater than or equal to ",
               position: (85, 39),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "toString",
                 position: (85, 76),
                },
                arguments: [
                 Variable {
                  identifier: "min",
                  position: (85, 85),
                 },
                ],
               },
              },
             ],
            },
           ],
          },
          position: (83, 37),
         },
         position: (83, 30),
        },
        position: (83, 25),
       },
       position: (83, 19),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertOnlyFields",
         position: (87, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "fields",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "group",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "attr",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: LetIn {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "badFields",
               position: (88, 9),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "filter",
              position: (88, 21),
             },
             arguments: [
              Function {
               argument: Some(
                "name",
               ),
               arguments: FunctionArguments {
                arguments: [],
                ellipsis: false,
               },
               definition: UnaryOperation {
                operator: Not,
                operand: FunctionApplication {
                 function: Variable {
                  identifier: "elem",
                  position: (88, 37),
                 },
                 arguments: [
                  Variable {
                   identifier: "name",
                   position: (88, 42),
                  },
                  Variable {
                   identifier: "fields",
                   position: (88, 47),
                  },
                 ],
                },
                position: (88, 35),
               },
               position: (88, 29),
              },
              FunctionApplication {
               function: Variable {
                identifier: "attrNames",
                position: (88, 56),
               },
               arguments: [
                Variable {
                 identifier: "attr",
                 position: (88, 66),
                },
               ],
              },
             ],
            },
           ),
          ],
          target: FunctionApplication {
           function: Variable {
            identifier: "optional",
            position: (89, 5),
           },
           arguments: [
            BinaryOperation {
             operator: NotEqualTo,
             operands: [
              Variable {
               identifier: "badFields",
               position: (89, 15),
              },
              List {
               elements: [],
               position: (89, 28),
              },
             ],
             position: (89, 25),
            },
            String {
             parts: [
              Raw {
               content: "Systemd ",
               position: (90, 8),
              },
              Expression {
               expression: Variable {
                identifier: "group",
                position: (90, 18),
               },
              },
              Raw {
               content: " has extra fields [",
               position: (90, 24),
              },
              Expression {
               expression: FunctionApplication {
                function: Variable {
                 identifier: "concatStringsSep",
                 position: (90, 45),
                },
                arguments: [
                 String {
                  parts: [
                   Raw {
                    content: " ",
                    position: (90, 63),
                   },
                  ],
                 },
                 Variable {
                  identifier: "badFields",
                  position: (90, 66),
                 },
                ],
               },
              },
              Raw {
               content: "].",
               position: (90, 76),
              },
             ],
            },
           ],
          },
          position: (88, 5),
         },
         position: (87, 37),
        },
        position: (87, 30),
       },
       position: (87, 22),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "assertInt",
         position: (92, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "name",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "group",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "attr",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: FunctionApplication {
          function: Variable {
           identifier: "optional",
           position: (93, 5),
          },
          arguments: [
           BinaryOperation {
            operator: LogicalAnd,
            operands: [
             HasProperty {
              expression: Variable {
               identifier: "attr",
               position: (93, 15),
              },
              attribute_path: AttributePath {
               attributes: [
                Expression {
                 expression: Variable {
                  identifier: "name",
                  position: (93, 24),
                 },
                },
               ],
              },
              position: (93, 20),
             },
             UnaryOperation {
              operator: Not,
              operand: FunctionApplication {
               function: Variable {
                identifier: "isInt",
                position: (93, 34),
               },
               arguments: [
                PropertyAccess {
                 expression: Variable {
                  identifier: "attr",
                  position: (93, 40),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Expression {
                    expression: Variable {
                     identifier: "name",
                     position: (93, 47),
                    },
                   },
                  ],
                 },
                 default: None,
                },
               ],
              },
              position: (93, 33),
             },
            ],
            position: (93, 30),
           },
           String {
            parts: [
             Raw {
              content: "Systemd ",
              position: (94, 8),
             },
             Expression {
              expression: Variable {
               identifier: "group",
               position: (94, 18),
              },
             },
             Raw {
              content: " field `",
              position: (94, 24),
             },
             Expression {
              expression: Variable {
               identifier: "name",
               position: (94, 34),
              },
             },
             Raw {
              content: "' is not an integer",
              position: (94, 39),
             },
            ],
           },
          ],
         },
         position: (92, 28),
        },
        position: (92, 21),
       },
       position: (92, 15),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "checkUnitConfig",
         position: (96, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "group",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "checks",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "attrs",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: LetIn {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "defs",
               position: (100, 5),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mapAttrs",
              position: (100, 12),
             },
             arguments: [
              FunctionApplication {
               function: Variable {
                identifier: "const",
                position: (100, 22),
               },
               arguments: [
                Function {
                 argument: Some(
                  "v",
                 ),
                 arguments: FunctionArguments {
                  arguments: [],
                  ellipsis: false,
                 },
                 definition: IfThenElse {
                  predicate: BinaryOperation {
                   operator: EqualTo,
                   operands: [
                    PropertyAccess {
                     expression: Variable {
                      identifier: "v",
                      position: (101, 10),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "_type",
                        position: (101, 12),
                       },
                      ],
                     },
                     default: Some(
                      String {
                       parts: [],
                      },
                     ),
                    },
                    String {
                     parts: [
                      Raw {
                       content: "override",
                       position: (101, 28),
                      },
                     ],
                    },
                   ],
                   position: (101, 24),
                  },
                  then: PropertyAccess {
                   expression: Variable {
                    identifier: "v",
                    position: (101, 43),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "content",
                      position: (101, 45),
                     },
                    ],
                   },
                   default: None,
                  },
                  else_: IfThenElse {
                   predicate: BinaryOperation {
                    operator: EqualTo,
                    operands: [
                     PropertyAccess {
                      expression: Variable {
                       identifier: "v",
                       position: (102, 15),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "_type",
                         position: (102, 17),
                        },
                       ],
                      },
                      default: Some(
                       String {
                        parts: [],
                       },
                      ),
                     },
                     String {
                      parts: [
                       Raw {
                        content: "if",
                        position: (102, 33),
                       },
                      ],
                     },
                    ],
                    position: (102, 29),
                   },
                   then: PropertyAccess {
                    expression: Variable {
                     identifier: "v",
                     position: (102, 42),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "content",
                       position: (102, 44),
                      },
                     ],
                    },
                    default: None,
                   },
                   else_: Variable {
                    identifier: "v",
                    position: (103, 12),
                   },
                   position: (102, 12),
                  },
                  position: (101, 7),
                 },
                 position: (100, 29),
                },
               ],
              },
              Variable {
               identifier: "attrs",
               position: (104, 8),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "errors",
               position: (105, 5),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "concatMap",
              position: (105, 14),
             },
             arguments: [
              Function {
               argument: Some(
                "c",
               ),
               arguments: FunctionArguments {
                arguments: [],
                ellipsis: false,
               },
               definition: FunctionApplication {
                function: Variable {
                 identifier: "c",
                 position: (105, 28),
                },
                arguments: [
                 Variable {
                  identifier: "group",
                  position: (105, 30),
                 },
                 Variable {
                  identifier: "defs",
                  position: (105, 36),
                 },
                ],
               },
               position: (105, 25),
              },
              Variable {
               identifier: "checks",
               position: (105, 42),
              },
             ],
            },
           ),
          ],
          target: IfThenElse {
           predicate: BinaryOperation {
            operator: EqualTo,
            operands: [
             Variable {
              identifier: "errors",
              position: (106, 9),
             },
             List {
              elements: [],
              position: (106, 19),
             },
            ],
            position: (106, 16),
           },
           then: Variable {
            identifier: "true",
            position: (106, 27),
           },
           else_: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "builtins",
              position: (107, 11),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "trace",
                position: (107, 20),
               },
              ],
             },
             default: None,
            },
            arguments: [
             FunctionApplication {
              function: Variable {
               identifier: "concatStringsSep",
               position: (107, 27),
              },
              arguments: [
               String {
                parts: [
                 Raw {
                  content: "\n",
                  position: (107, 45),
                 },
                ],
               },
               Variable {
                identifier: "errors",
                position: (107, 49),
               },
              ],
             },
             Variable {
              identifier: "false",
              position: (107, 57),
             },
            ],
           },
           position: (106, 6),
          },
          position: (96, 43),
         },
         position: (96, 36),
        },
        position: (96, 28),
       },
       position: (96, 21),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "toOption",
         position: (109, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "x",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: IfThenElse {
        predicate: BinaryOperation {
         operator: EqualTo,
         operands: [
          Variable {
           identifier: "x",
           position: (110, 8),
          },
          Variable {
           identifier: "true",
           position: (110, 13),
          },
         ],
         position: (110, 10),
        },
        then: String {
         parts: [
          Raw {
           content: "true",
           position: (110, 24),
          },
         ],
        },
        else_: IfThenElse {
         predicate: BinaryOperation {
          operator: EqualTo,
          operands: [
           Variable {
            identifier: "x",
            position: (111, 13),
           },
           Variable {
            identifier: "false",
            position: (111, 18),
           },
          ],
          position: (111, 15),
         },
         then: String {
          parts: [
           Raw {
            content: "false",
            position: (111, 30),
           },
          ],
         },
         else_: FunctionApplication {
          function: Variable {
           identifier: "toString",
           position: (112, 10),
          },
          arguments: [
           Variable {
            identifier: "x",
            position: (112, 19),
           },
          ],
         },
         position: (111, 10),
        },
        position: (110, 5),
       },
       position: (109, 14),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "attrsToSection",
         position: (114, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "as",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: FunctionApplication {
        function: Variable {
         identifier: "concatStrings",
         position: (115, 5),
        },
        arguments: [
         FunctionApplication {
          function: Variable {
           identifier: "concatLists",
           position: (115, 20),
          },
          arguments: [
           FunctionApplication {
            function: Variable {
             identifier: "mapAttrsToList",
             position: (115, 33),
            },
            arguments: [
             Function {
              argument: Some(
               "name",
              ),
              arguments: FunctionArguments {
               arguments: [],
               ellipsis: false,
              },
              definition: Function {
               argument: Some(
                "value",
               ),
               arguments: FunctionArguments {
                arguments: [],
                ellipsis: false,
               },
               definition: FunctionApplication {
                function: Variable {
                 identifier: "map",
                 position: (116, 7),
                },
                arguments: [
                 Function {
                  argument: Some(
                   "x",
                  ),
                  arguments: FunctionArguments {
                   arguments: [],
                   ellipsis: false,
                  },
                  definition: String {
                   parts: [
                    Raw {
                     content: "",
                     position: (117, 1),
                    },
                    Expression {
                     expression: Variable {
                      identifier: "name",
                      position: (117, 13),
                     },
                    },
                    Raw {
                     content: "=",
                     position: (117, 18),
                    },
                    Expression {
                     expression: FunctionApplication {
                      function: Variable {
                       identifier: "toOption",
                       position: (117, 21),
                      },
                      arguments: [
                       Variable {
                        identifier: "x",
                        position: (117, 30),
                       },
                      ],
                     },
                    },
                    Raw {
                     content: "\n",
                     position: (117, 32),
                    },
                   ],
                  },
                  position: (116, 12),
                 },
                 IfThenElse {
                  predicate: FunctionApplication {
                   function: Variable {
                    identifier: "isList",
                    position: (119, 13),
                   },
                   arguments: [
                    Variable {
                     identifier: "value",
                     position: (119, 20),
                    },
                   ],
                  },
                  then: Variable {
                   identifier: "value",
                   position: (119, 31),
                  },
                  else_: List {
                   elements: [
                    Variable {
                     identifier: "value",
                     position: (119, 43),
                    },
                   ],
                   position: (119, 42),
                  },
                  position: (119, 10),
                 },
                ],
               },
               position: (115, 55),
              },
              position: (115, 49),
             },
             Variable {
              identifier: "as",
              position: (120, 9),
             },
            ],
           },
          ],
         },
        ],
       },
       position: (114, 20),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "generateUnits",
         position: (122, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "generateUnits'",
        position: (122, 19),
       },
       arguments: [
        Variable {
         identifier: "true",
         position: (122, 34),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "generateUnits'",
         position: (124, 3),
        },
       ],
      },
      Function {
       argument: Some(
        "allowCollisions",
       ),
       arguments: FunctionArguments {
        arguments: [],
        ellipsis: false,
       },
       definition: Function {
        argument: Some(
         "type",
        ),
        arguments: FunctionArguments {
         arguments: [],
         ellipsis: false,
        },
        definition: Function {
         argument: Some(
          "units",
         ),
         arguments: FunctionArguments {
          arguments: [],
          ellipsis: false,
         },
         definition: Function {
          argument: Some(
           "upstreamUnits",
          ),
          arguments: FunctionArguments {
           arguments: [],
           ellipsis: false,
          },
          definition: Function {
           argument: Some(
            "upstreamWants",
           ),
           arguments: FunctionArguments {
            arguments: [],
            ellipsis: false,
           },
           definition: FunctionApplication {
            function: PropertyAccess {
             expression: Variable {
              identifier: "pkgs",
              position: (125, 5),
             },
             attribute_path: AttributePath {
              attributes: [
               Raw {
                content: "runCommand",
                position: (125, 10),
               },
              ],
             },
             default: None,
            },
            arguments: [
             String {
              parts: [
               Expression {
                expression: Variable {
                 identifier: "type",
                 position: (125, 24),
                },
               },
               Raw {
                content: "-units",
                position: (125, 29),
               },
              ],
             },
             Map {
              bindings: [
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "preferLocalBuild",
                   position: (126, 9),
                  },
                 ],
                },
                Variable {
                 identifier: "true",
                 position: (126, 28),
                },
               ),
               KeyValue(
                AttributePath {
                 attributes: [
                  Raw {
                   content: "allowSubstitutes",
                   position: (127, 9),
                  },
                 ],
                },
                Variable {
                 identifier: "false",
                 position: (127, 28),
                },
               ),
              ],
              recursive: false,
              position: (126, 7),
             },
             String {
              parts: [
               Raw {
                content: "mkdir -p $out\n\n# Copy the upstream systemd units we're interested in.\nfor i in ",
                position: (129, 1),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (132, 18),
                 },
                 arguments: [
                  Variable {
                   identifier: "upstreamUnits",
                   position: (132, 27),
                  },
                 ],
                },
               },
               Raw {
                content: "; do\n  fn=",
                position: (132, 41),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (133, 14),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "package",
                    position: (133, 18),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "/example/systemd/",
                position: (133, 26),
               },
               Expression {
                expression: Variable {
                 identifier: "type",
                 position: (133, 45),
                },
               },
               Raw {
                content: "/$i\n  if ! [ -e $fn ]; then echo \"missing $fn\"; false; fi\n  if [ -L $fn ]; then\n    target=\"$(readlink \"$fn\")\"\n    if [ ",
                position: (133, 50),
               },
               Raw {
                content: "$",
                position: (137, 16),
               },
               Raw {
                content: "{target:0:3} = ../ ]; then\n      ln -s \"$(readlink -f \"$fn\")\" $out/\n    else\n      cp -pd $fn $out/\n    fi\n  else\n    ln -s $fn $out/\n  fi\ndone\n\n# Copy .wants links, but only those that point to units that\n# we're interested in.\nfor i in ",
                position: (137, 19),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (149, 18),
                 },
                 arguments: [
                  Variable {
                   identifier: "upstreamWants",
                   position: (149, 27),
                  },
                 ],
                },
               },
               Raw {
                content: "; do\n  fn=",
                position: (149, 41),
               },
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (150, 14),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "package",
                    position: (150, 18),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "/example/systemd/",
                position: (150, 26),
               },
               Expression {
                expression: Variable {
                 identifier: "type",
                 position: (150, 45),
                },
               },
               Raw {
                content: "/$i\n  if ! [ -e $fn ]; then echo \"missing $fn\"; false; fi\n  x=$out/$(basename $fn)\n  mkdir $x\n  for i in $fn/*; do\n    y=$x/$(basename $i)\n    cp -pd $i $y\n    if ! [ -e $y ]; then rm $y; fi\n  done\ndone\n\n# Symlink all units provided listed in systemd.packages.\npackages=\"",
                position: (150, 50),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (162, 19),
                 },
                 arguments: [
                  PropertyAccess {
                   expression: Variable {
                    identifier: "cfg",
                    position: (162, 28),
                   },
                   attribute_path: AttributePath {
                    attributes: [
                     Raw {
                      content: "packages",
                      position: (162, 32),
                     },
                    ],
                   },
                   default: None,
                  },
                 ],
                },
               },
               Raw {
                content: "\"\n\n# Filter duplicate directories\ndeclare -A unique_packages\nfor k in $packages ; do unique_packages[$k]=1 ; done\n\nfor i in ",
                position: (162, 41),
               },
               Raw {
                content: "$",
                position: (168, 16),
               },
               Raw {
                content: "{!unique_packages[@]}; do\n  for fn in $i/etc/systemd/",
                position: (168, 19),
               },
               Expression {
                expression: Variable {
                 identifier: "type",
                 position: (169, 36),
                },
               },
               Raw {
                content: "/* $i/lib/systemd/",
                position: (169, 41),
               },
               Expression {
                expression: Variable {
                 identifier: "type",
                 position: (169, 61),
                },
               },
               Raw {
                content: "/*; do\n    if ! [[ \"$fn\" =~ .wants$ ]]; then\n      if [[ -d \"$fn\" ]]; then\n        targetDir=\"$out/$(basename \"$fn\")\"\n        mkdir -p \"$targetDir\"\n        ",
                position: (169, 66),
               },
               Expression {
                expression: Variable {
                 identifier: "lndir",
                 position: (174, 17),
                },
               },
               Raw {
                content: " \"$fn\" \"$targetDir\"\n      else\n        ln -s $fn $out/\n      fi\n    fi\n  done\ndone\n\n# Symlink all units defined by systemd.units. If these are also\n# provided by systemd or systemd.packages, then add them as\n# <unit-name>.d/overrides.conf, which makes them extend the\n# upstream unit.\nfor i in ",
                position: (174, 23),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "toString",
                  position: (186, 18),
                 },
                 arguments: [
                  FunctionApplication {
                   function: Variable {
                    identifier: "mapAttrsToList",
                    position: (186, 28),
                   },
                   arguments: [
                    Function {
                     argument: Some(
                      "n",
                     ),
                     arguments: FunctionArguments {
                      arguments: [],
                      ellipsis: false,
                     },
                     definition: Function {
                      argument: Some(
                       "v",
                      ),
                      arguments: FunctionArguments {
                       arguments: [],
                       ellipsis: false,
                      },
                      definition: PropertyAccess {
                       expression: Variable {
                        identifier: "v",
                        position: (186, 50),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "unit",
                          position: (186, 52),
                         },
                        ],
                       },
                       default: None,
                      },
                      position: (186, 47),
                     },
                     position: (186, 44),
                    },
                    Variable {
                     identifier: "units",
                     position: (186, 58),
                    },
                   ],
                  },
                 ],
                },
               },
               Raw {
                content: "; do\n  fn=$(basename $i/*)\n  if [ -e $out/$fn ]; then\n    if [ \"$(readlink -f $i/$fn)\" = /dev/null ]; then\n      ln -sfn /dev/null $out/$fn\n    else\n      ",
                position: (186, 65),
               },
               Expression {
                expression: IfThenElse {
                 predicate: Variable {
                  identifier: "allowCollisions",
                  position: (192, 18),
                 },
                 then: String {
                  parts: [
                   Raw {
                    content: "mkdir -p $out/$fn.d\nln -s $i/$fn $out/$fn.d/overrides.conf\n",
                    position: (193, 1),
                   },
                  ],
                 },
                 else_: String {
                  parts: [
                   Raw {
                    content: "echo \"Found multiple derivations configuring $fn!\"\nexit 1\n",
                    position: (196, 1),
                   },
                  ],
                 },
                 position: (192, 15),
                },
               },
               Raw {
                content: "\n    fi\n else\n    ln -fs $i/$fn $out/\n  fi\ndone\n\n# Create service aliases from aliases option.\n",
                position: (198, 16),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "concatStrings",
                  position: (206, 9),
                 },
                 arguments: [
                  FunctionApplication {
                   function: Variable {
                    identifier: "mapAttrsToList",
                    position: (206, 24),
                   },
                   arguments: [
                    Function {
                     argument: Some(
                      "name",
                     ),
                     arguments: FunctionArguments {
                      arguments: [],
                      ellipsis: false,
                     },
                     definition: Function {
                      argument: Some(
                       "unit",
                      ),
                      arguments: FunctionArguments {
                       arguments: [],
                       ellipsis: false,
                      },
                      definition: FunctionApplication {
                       function: Variable {
                        identifier: "concatMapStrings",
                        position: (207, 11),
                       },
                       arguments: [
                        Function {
                         argument: Some(
                          "name2",
                         ),
                         arguments: FunctionArguments {
                          arguments: [],
                          ellipsis: false,
                         },
                         definition: String {
                          parts: [
                           Raw {
                            content: "ln -sfn ",
                            position: (208, 1),
                           },
                           Raw {
                            content: "'",
                            position: (208, 21),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name",
                             position: (208, 24),
                            },
                           },
                           Raw {
                            content: "' $out/",
                            position: (208, 29),
                           },
                           Raw {
                            content: "'",
                            position: (208, 36),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name2",
                             position: (208, 39),
                            },
                           },
                           Raw {
                            content: "'\n",
                            position: (208, 45),
                           },
                          ],
                         },
                         position: (207, 29),
                        },
                        PropertyAccess {
                         expression: Variable {
                          identifier: "unit",
                          position: (209, 15),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "aliases",
                            position: (209, 20),
                           },
                          ],
                         },
                         default: None,
                        },
                       ],
                      },
                      position: (206, 46),
                     },
                     position: (206, 40),
                    },
                    Variable {
                     identifier: "units",
                     position: (209, 29),
                    },
                   ],
                  },
                 ],
                },
               },
               Raw {
                content: "\n\n# Create .wants and .requires symlinks from the wantedBy and\n# requiredBy options.\n",
                position: (209, 36),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "concatStrings",
                  position: (213, 9),
                 },
                 arguments: [
                  FunctionApplication {
                   function: Variable {
                    identifier: "mapAttrsToList",
                    position: (213, 24),
                   },
                   arguments: [
                    Function {
                     argument: Some(
                      "name",
                     ),
                     arguments: FunctionArguments {
                      arguments: [],
                      ellipsis: false,
                     },
                     definition: Function {
                      argument: Some(
                       "unit",
                      ),
                      arguments: FunctionArguments {
                       arguments: [],
                       ellipsis: false,
                      },
                      definition: FunctionApplication {
                       function: Variable {
                        identifier: "concatMapStrings",
                        position: (214, 11),
                       },
                       arguments: [
                        Function {
                         argument: Some(
                          "name2",
                         ),
                         arguments: FunctionArguments {
                          arguments: [],
                          ellipsis: false,
                         },
                         definition: String {
                          parts: [
                           Raw {
                            content: "mkdir -p $out/",
                            position: (215, 1),
                           },
                           Raw {
                            content: "'",
                            position: (215, 27),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name2",
                             position: (215, 30),
                            },
                           },
                           Raw {
                            content: ".wants'\nln -sfn '../",
                            position: (215, 36),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name",
                             position: (216, 27),
                            },
                           },
                           Raw {
                            content: "' $out/",
                            position: (216, 32),
                           },
                           Raw {
                            content: "'",
                            position: (216, 39),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name2",
                             position: (216, 42),
                            },
                           },
                           Raw {
                            content: ".wants'/\n",
                            position: (216, 48),
                           },
                          ],
                         },
                         position: (214, 29),
                        },
                        PropertyAccess {
                         expression: Variable {
                          identifier: "unit",
                          position: (217, 15),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "wantedBy",
                            position: (217, 20),
                           },
                          ],
                         },
                         default: None,
                        },
                       ],
                      },
                      position: (213, 46),
                     },
                     position: (213, 40),
                    },
                    Variable {
                     identifier: "units",
                     position: (217, 30),
                    },
                   ],
                  },
                 ],
                },
               },
               Raw {
                content: "\n\n",
                position: (217, 37),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "concatStrings",
                  position: (219, 9),
                 },
                 arguments: [
                  FunctionApplication {
                   function: Variable {
                    identifier: "mapAttrsToList",
                    position: (219, 24),
                   },
                   arguments: [
                    Function {
                     argument: Some(
                      "name",
                     ),
                     arguments: FunctionArguments {
                      arguments: [],
                      ellipsis: false,
                     },
                     definition: Function {
                      argument: Some(
                       "unit",
                      ),
                      arguments: FunctionArguments {
                       arguments: [],
                       ellipsis: false,
                      },
                      definition: FunctionApplication {
                       function: Variable {
                        identifier: "concatMapStrings",
                        position: (220, 11),
                       },
                       arguments: [
                        Function {
                         argument: Some(
                          "name2",
                         ),
                         arguments: FunctionArguments {
                          arguments: [],
                          ellipsis: false,
                         },
                         definition: String {
                          parts: [
                           Raw {
                            content: "mkdir -p $out/",
                            position: (221, 1),
                           },
                           Raw {
                            content: "'",
                            position: (221, 27),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name2",
                             position: (221, 30),
                            },
                           },
                           Raw {
                            content: ".requires'\nln -sfn '../",
                            position: (221, 36),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name",
                             position: (222, 27),
                            },
                           },
                           Raw {
                            content: "' $out/",
                            position: (222, 32),
                           },
                           Raw {
                            content: "'",
                            position: (222, 39),
                           },
                           Expression {
                            expression: Variable {
                             identifier: "name2",
                             position: (222, 42),
                            },
                           },
                           Raw {
                            content: ".requires'/\n",
                            position: (222, 48),
                           },
                          ],
                         },
                         position: (220, 29),
                        },
                        PropertyAccess {
                         expression: Variable {
                          identifier: "unit",
                          position: (223, 15),
                         },
                         attribute_path: AttributePath {
                          attributes: [
                           Raw {
                            content: "requiredBy",
                            position: (223, 20),
                           },
                          ],
                         },
                         default: None,
                        },
                       ],
                      },
                      position: (219, 46),
                     },
                     position: (219, 40),
                    },
                    Variable {
                     identifier: "units",
                     position: (223, 32),
                    },
                   ],
                  },
                 ],
                },
               },
               Raw {
                content: "\n\n",
                position: (223, 39),
               },
               Expression {
                expression: FunctionApplication {
                 function: Variable {
                  identifier: "optionalString",
                  position: (225, 9),
                 },
                 arguments: [
                  BinaryOperation {
                   operator: EqualTo,
                   operands: [
                    Variable {
                     identifier: "type",
                     position: (225, 25),
                    },
                    String {
                     parts: [
                      Raw {
                       content: "system",
                       position: (225, 34),
                      },
                     ],
                    },
                   ],
                   position: (225, 30),
                  },
                  String {
                   parts: [
                    Raw {
                     content: "# Stupid misc. symlinks.\nln -s ",
                     position: (226, 1),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (227, 17),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "defaultUnit",
                         position: (227, 21),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " $out/default.target\nln -s ",
                     position: (227, 33),
                    },
                    Expression {
                     expression: PropertyAccess {
                      expression: Variable {
                       identifier: "cfg",
                       position: (228, 17),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "ctrlAltDelUnit",
                         position: (228, 21),
                        },
                       ],
                      },
                      default: None,
                     },
                    },
                    Raw {
                     content: " $out/ctrl-alt-del.target\nln -s rescue.target $out/kbrequest.target\n\nmkdir -p $out/getty.target.wants/\nln -s ../autovt@tty1.service $out/getty.target.wants/\n\nln -s ../remote-fs.target $out/multi-user.target.wants/\n",
                     position: (228, 36),
                    },
                   ],
                  },
                 ],
                },
               },
               Raw {
                content: "\n",
                position: (235, 10),
               },
              ],
             },
            ],
           },
           position: (124, 65),
          },
          position: (124, 50),
         },
         position: (124, 43),
        },
        position: (124, 37),
       },
       position: (124, 20),
      },
     ),
    ],
    recursive: true,
    position: (8, 4),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}