---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (3, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (6, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (6, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (6, 16),
        },
        Raw {
         content: "torque",
         position: (6, 25),
        },
        Raw {
         content: "server",
         position: (6, 32),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "torque",
        position: (7, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "pkgs",
       position: (7, 12),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "torque",
         position: (7, 17),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (10, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "services",
            position: (12, 5),
           },
           Raw {
            content: "torque",
            position: (12, 14),
           },
           Raw {
            content: "server",
            position: (12, 21),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (14, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkEnableOption",
              position: (14, 16),
             },
             arguments: [
              String {
               parts: [
                Raw {
                 content: "torque server",
                 position: (14, 32),
                },
               ],
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (12, 30),
         },
        ),
       ],
       recursive: false,
       position: (10, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (20, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (20, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (20, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (20, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (21, 5),
             },
             Raw {
              content: "systemPackages",
              position: (21, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "pkgs",
               position: (21, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "torque",
                 position: (21, 41),
                },
               ],
              },
              default: None,
             },
            ],
            position: (21, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (23, 5),
             },
             Raw {
              content: "services",
              position: (23, 13),
             },
             Raw {
              content: "torque-server-init",
              position: (23, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (24, 7),
                },
               ],
              },
              With {
               expression: Variable {
                identifier: "pkgs",
                position: (24, 19),
               },
               target: List {
                elements: [
                 Variable {
                  identifier: "torque",
                  position: (24, 27),
                 },
                 Variable {
                  identifier: "util-linux",
                  position: (24, 34),
                 },
                 Variable {
                  identifier: "procps",
                  position: (24, 45),
                 },
                 Variable {
                  identifier: "inetutils",
                  position: (24, 52),
                 },
                ],
                position: (24, 25),
               },
               position: (24, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "script",
                 position: (26, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "tmpsetup=$(mktemp -t torque-XXXX)\ncp -p ",
                 position: (27, 1),
                },
                Expression {
                 expression: Variable {
                  identifier: "torque",
                  position: (28, 17),
                 },
                },
                Raw {
                 content: "/bin/torque.setup $tmpsetup\nsed -i $tmpsetup -e 's/pbs_server -t create/pbs_server -f -t create/'\n\npbs_mkdirs -v aux\npbs_mkdirs -v server\nhostname > /var/spool/torque/server_name\ncp -prv ",
                 position: (28, 24),
                },
                Expression {
                 expression: Variable {
                  identifier: "torque",
                  position: (34, 19),
                 },
                },
                Raw {
                 content: "/var/spool/torque/* /var/spool/torque/\n$tmpsetup root\n\nsleep 1\nrm -f $tmpsetup\nkill $(pgrep pbs_server) 2>/dev/null\nkill $(pgrep trqauthd) 2>/dev/null\n",
                 position: (34, 26),
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (43, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (44, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "oneshot",
                    position: (44, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "RemainAfterExit",
                    position: (45, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (45, 27),
                 },
                ),
               ],
               recursive: false,
               position: (43, 23),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "unitConfig",
                 position: (48, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ConditionPathExists",
                    position: (49, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "!/var/spool/torque",
                    position: (49, 32),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (48, 20),
              },
             ),
            ],
            recursive: false,
            position: (23, 43),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (53, 5),
             },
             Raw {
              content: "services",
              position: (53, 13),
             },
             Raw {
              content: "trqauthd",
              position: (53, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (54, 7),
                },
               ],
              },
              List {
               elements: [
                Variable {
                 identifier: "torque",
                 position: (54, 16),
                },
               ],
               position: (54, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "requires",
                 position: (56, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "torque-server-init.service",
                   position: (56, 21),
                  },
                 ],
                },
               ],
               position: (56, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (57, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "torque-server-init.service",
                   position: (57, 18),
                  },
                 ],
                },
               ],
               position: (57, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (59, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (60, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "forking",
                    position: (60, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (61, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: Variable {
                     identifier: "torque",
                     position: (61, 24),
                    },
                   },
                   Raw {
                    content: "/bin/trqauthd",
                    position: (61, 31),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (59, 23),
              },
             ),
            ],
            recursive: false,
            position: (53, 33),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (65, 5),
             },
             Raw {
              content: "services",
              position: (65, 13),
             },
             Raw {
              content: "torque-server",
              position: (65, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (66, 7),
                },
               ],
              },
              List {
               elements: [
                Variable {
                 identifier: "torque",
                 position: (66, 16),
                },
               ],
               position: (66, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (68, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "multi-user.target",
                   position: (68, 21),
                  },
                 ],
                },
               ],
               position: (68, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wants",
                 position: (69, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "torque-scheduler.service",
                   position: (69, 18),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "trqauthd.service",
                   position: (69, 45),
                  },
                 ],
                },
               ],
               position: (69, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "before",
                 position: (70, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "trqauthd.service",
                   position: (70, 19),
                  },
                 ],
                },
               ],
               position: (70, 16),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "requires",
                 position: (71, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "torque-server-init.service",
                   position: (71, 21),
                  },
                 ],
                },
               ],
               position: (71, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (72, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "torque-server-init.service",
                   position: (72, 18),
                  },
                 ],
                },
                String {
                 parts: [
                  Raw {
                   content: "network.target",
                   position: (72, 47),
                  },
                 ],
                },
               ],
               position: (72, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (74, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (75, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "forking",
                    position: (75, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (76, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: Variable {
                     identifier: "torque",
                     position: (76, 24),
                    },
                   },
                   Raw {
                    content: "/bin/pbs_server",
                    position: (76, 31),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStop",
                    position: (77, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: Variable {
                     identifier: "torque",
                     position: (77, 23),
                    },
                   },
                   Raw {
                    content: "/bin/qterm",
                    position: (77, 30),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PIDFile",
                    position: (78, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/spool/torque/server_priv/server.lock",
                    position: (78, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (74, 23),
              },
             ),
            ],
            recursive: false,
            position: (65, 38),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (82, 5),
             },
             Raw {
              content: "services",
              position: (82, 13),
             },
             Raw {
              content: "torque-scheduler",
              position: (82, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "path",
                 position: (83, 7),
                },
               ],
              },
              List {
               elements: [
                Variable {
                 identifier: "torque",
                 position: (83, 16),
                },
               ],
               position: (83, 14),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "requires",
                 position: (85, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "torque-server-init.service",
                   position: (85, 21),
                  },
                 ],
                },
               ],
               position: (85, 18),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "after",
                 position: (86, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "torque-server-init.service",
                   position: (86, 18),
                  },
                 ],
                },
               ],
               position: (86, 15),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (88, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Type",
                    position: (89, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "forking",
                    position: (89, 17),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (90, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: Variable {
                     identifier: "torque",
                     position: (90, 24),
                    },
                   },
                   Raw {
                    content: "/bin/pbs_sched",
                    position: (90, 31),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "PIDFile",
                    position: (91, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "/var/spool/torque/sched_priv/sched.lock",
                    position: (91, 20),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (88, 23),
              },
             ),
            ],
            recursive: false,
            position: (82, 41),
           },
          ),
         ],
         recursive: false,
         position: (20, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (9, 1),
   },
   position: (5, 1),
  },
  position: (3, 1),
 },
 position: (1, 1),
}