---
Function {
 argument: None,
 arguments: FunctionArguments {
  arguments: [
   FunctionArgument {
    identifier: "pkgs",
    default: None,
   },
   FunctionArgument {
    identifier: "lib",
    default: None,
   },
   FunctionArgument {
    identifier: "config",
    default: None,
   },
  ],
  ellipsis: true,
 },
 definition: With {
  expression: Variable {
   identifier: "lib",
   position: (2, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (5, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (5, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "services",
         position: (5, 16),
        },
        Raw {
         content: "greetd",
         position: (5, 25),
        },
       ],
      },
      default: None,
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "tty",
        position: (6, 3),
       },
      ],
     },
     String {
      parts: [
       Raw {
        content: "tty",
        position: (6, 10),
       },
       Expression {
        expression: FunctionApplication {
         function: Variable {
          identifier: "toString",
          position: (6, 15),
         },
         arguments: [
          PropertyAccess {
           expression: Variable {
            identifier: "cfg",
            position: (6, 24),
           },
           attribute_path: AttributePath {
            attributes: [
             Raw {
              content: "vt",
              position: (6, 28),
             },
            ],
           },
           default: None,
          },
         ],
        },
       },
      ],
     },
    ),
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "settingsFormat",
        position: (7, 3),
       },
      ],
     },
     FunctionApplication {
      function: PropertyAccess {
       expression: Variable {
        identifier: "pkgs",
        position: (7, 20),
       },
       attribute_path: AttributePath {
        attributes: [
         Raw {
          content: "formats",
          position: (7, 25),
         },
         Raw {
          content: "toml",
          position: (7, 33),
         },
        ],
       },
       default: None,
      },
      arguments: [
       Map {
        bindings: [],
        recursive: false,
        position: (7, 38),
       },
      ],
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (10, 3),
        },
        Raw {
         content: "services",
         position: (10, 11),
        },
        Raw {
         content: "greetd",
         position: (10, 20),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (11, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkEnableOption",
           position: (11, 14),
          },
          arguments: [
           String {
            parts: [
             Raw {
              content: "greetd",
              position: (11, 30),
             },
            ],
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "package",
            position: (13, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (13, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (14, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (14, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "package",
                  position: (14, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (15, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (15, 17),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "greetd",
                  position: (15, 22),
                 },
                 Raw {
                  content: "greetd",
                  position: (15, 29),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (16, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (16, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "pkgs.greetd.greetd",
                   position: (16, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (17, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The greetd package that should be used.",
                 position: (17, 22),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (13, 24),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "settings",
            position: (20, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (20, 16),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (21, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "settingsFormat",
                position: (21, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "type",
                  position: (21, 29),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "example",
                 position: (22, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (22, 17),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "{\n  default_session = {\n    command = \"",
                   position: (23, 1),
                  },
                  Raw {
                   content: "$",
                   position: (25, 24),
                  },
                  Raw {
                   content: "{pkgs.greetd.greetd}/bin/agreety --cmd sway\";\n  };\n}\n",
                   position: (25, 27),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (29, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "greetd configuration (<link xlink:href=\"https://man.sr.ht/~kennylevinsen/greetd/\">documentation</link>)\nas a Nix attribute set.\n",
                 position: (30, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (20, 25),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "vt",
            position: (35, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (35, 10),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (36, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (36, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "int",
                  position: (36, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (37, 7),
                },
               ],
              },
              Int {
               value: 1,
               position: (37, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (38, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "The virtual console (tty) that greetd should use. This option also disables getty on that tty.\n",
                 position: (39, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (35, 20),
           },
          ],
         },
        ),
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "restart",
            position: (43, 5),
           },
          ],
         },
         FunctionApplication {
          function: Variable {
           identifier: "mkOption",
           position: (43, 15),
          },
          arguments: [
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "type",
                 position: (44, 7),
                },
               ],
              },
              PropertyAccess {
               expression: Variable {
                identifier: "types",
                position: (44, 14),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bool",
                  position: (44, 20),
                 },
                ],
               },
               default: None,
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "default",
                 position: (45, 7),
                },
               ],
              },
              UnaryOperation {
               operator: Not,
               operand: HasProperty {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (45, 19),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "settings",
                    position: (45, 23),
                   },
                  ],
                 },
                 default: None,
                },
                attribute_path: AttributePath {
                 attributes: [
                  Raw {
                   content: "initial_session",
                   position: (45, 34),
                  },
                 ],
                },
                position: (45, 32),
               },
               position: (45, 17),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "defaultText",
                 position: (46, 7),
                },
               ],
              },
              FunctionApplication {
               function: Variable {
                identifier: "literalExpression",
                position: (46, 21),
               },
               arguments: [
                String {
                 parts: [
                  Raw {
                   content: "!(config.services.greetd.settings ? initial_session)",
                   position: (46, 40),
                  },
                 ],
                },
               ],
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "description",
                 position: (47, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "Wether to restart greetd when it terminates (e.g. on failure).\nThis is usually desirable so a user can always log in, but should be disabled when using 'settings.initial_session' (autologin),\nbecause every greetd restart will trigger the autologin again.\n",
                 position: (48, 1),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (43, 24),
           },
          ],
         },
        ),
       ],
       recursive: false,
       position: (10, 29),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (54, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (54, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (54, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (54, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (56, 5),
             },
             Raw {
              content: "greetd",
              position: (56, 14),
             },
             Raw {
              content: "settings",
              position: (56, 21),
             },
             Raw {
              content: "terminal",
              position: (56, 30),
             },
             Raw {
              content: "vt",
              position: (56, 39),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkDefault",
             position: (56, 44),
            },
            arguments: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (56, 54),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "vt",
                 position: (56, 58),
                },
               ],
              },
              default: None,
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "services",
              position: (57, 5),
             },
             Raw {
              content: "greetd",
              position: (57, 14),
             },
             Raw {
              content: "settings",
              position: (57, 21),
             },
             Raw {
              content: "default_session",
              position: (57, 30),
             },
            ],
           },
           FunctionApplication {
            function: Variable {
             identifier: "mkDefault",
             position: (57, 48),
            },
            arguments: [
             String {
              parts: [
               Raw {
                content: "greeter",
                position: (57, 59),
               },
              ],
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "security",
              position: (59, 5),
             },
             Raw {
              content: "pam",
              position: (59, 14),
             },
             Raw {
              content: "services",
              position: (59, 18),
             },
             Raw {
              content: "greetd",
              position: (59, 27),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "allowNullPassword",
                 position: (60, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (60, 27),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "startSession",
                 position: (61, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (61, 22),
              },
             ),
            ],
            recursive: false,
            position: (59, 36),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (65, 5),
             },
             Raw {
              content: "services",
              position: (65, 13),
             },
             Expression {
              expression: String {
               parts: [
                Raw {
                 content: "autovt@",
                 position: (65, 23),
                },
                Expression {
                 expression: Variable {
                  identifier: "tty",
                  position: (65, 32),
                 },
                },
               ],
              },
             },
             Raw {
              content: "enable",
              position: (65, 38),
             },
            ],
           },
           Variable {
            identifier: "false",
            position: (65, 47),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (67, 5),
             },
             Raw {
              content: "services",
              position: (67, 13),
             },
             Raw {
              content: "greetd",
              position: (67, 22),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "unitConfig",
                 position: (68, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Wants",
                    position: (69, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "systemd-user-sessions.service",
                      position: (70, 12),
                     },
                    ],
                   },
                  ],
                  position: (69, 17),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "After",
                    position: (72, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "systemd-user-sessions.service",
                      position: (73, 12),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "plymouth-quit-wait.service",
                      position: (74, 12),
                     },
                    ],
                   },
                   String {
                    parts: [
                     Raw {
                      content: "getty@",
                      position: (75, 12),
                     },
                     Expression {
                      expression: Variable {
                       identifier: "tty",
                       position: (75, 20),
                      },
                     },
                     Raw {
                      content: ".service",
                      position: (75, 24),
                     },
                    ],
                   },
                  ],
                  position: (72, 17),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Conflicts",
                    position: (77, 9),
                   },
                  ],
                 },
                 List {
                  elements: [
                   String {
                    parts: [
                     Raw {
                      content: "getty@",
                      position: (78, 12),
                     },
                     Expression {
                      expression: Variable {
                       identifier: "tty",
                       position: (78, 20),
                      },
                     },
                     Raw {
                      content: ".service",
                      position: (78, 24),
                     },
                    ],
                   },
                  ],
                  position: (77, 21),
                 },
                ),
               ],
               recursive: false,
               position: (68, 20),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "serviceConfig",
                 position: (82, 7),
                },
               ],
              },
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "ExecStart",
                    position: (83, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Expression {
                    expression: PropertyAccess {
                     expression: Variable {
                      identifier: "pkgs",
                      position: (83, 24),
                     },
                     attribute_path: AttributePath {
                      attributes: [
                       Raw {
                        content: "greetd",
                        position: (83, 29),
                       },
                       Raw {
                        content: "greetd",
                        position: (83, 36),
                       },
                      ],
                     },
                     default: None,
                    },
                   },
                   Raw {
                    content: "/bin/greetd --config ",
                    position: (83, 43),
                   },
                   Expression {
                    expression: FunctionApplication {
                     function: PropertyAccess {
                      expression: Variable {
                       identifier: "settingsFormat",
                       position: (83, 66),
                      },
                      attribute_path: AttributePath {
                       attributes: [
                        Raw {
                         content: "generate",
                         position: (83, 81),
                        },
                       ],
                      },
                      default: None,
                     },
                     arguments: [
                      String {
                       parts: [
                        Raw {
                         content: "greetd.toml",
                         position: (83, 91),
                        },
                       ],
                      },
                      PropertyAccess {
                       expression: Variable {
                        identifier: "cfg",
                        position: (83, 104),
                       },
                       attribute_path: AttributePath {
                        attributes: [
                         Raw {
                          content: "settings",
                          position: (83, 108),
                         },
                        ],
                       },
                       default: None,
                      },
                     ],
                    },
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "Restart",
                    position: (85, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "mkIf",
                   position: (85, 19),
                  },
                  arguments: [
                   PropertyAccess {
                    expression: Variable {
                     identifier: "cfg",
                     position: (85, 24),
                    },
                    attribute_path: AttributePath {
                     attributes: [
                      Raw {
                       content: "restart",
                       position: (85, 28),
                      },
                     ],
                    },
                    default: None,
                   },
                   String {
                    parts: [
                     Raw {
                      content: "always",
                      position: (85, 37),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "IgnoreSIGPIPE",
                    position: (88, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (88, 25),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "SendSIGHUP",
                    position: (89, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "true",
                  position: (89, 22),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "TimeoutStopSec",
                    position: (90, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "30s",
                    position: (90, 27),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "KeyringMode",
                    position: (91, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "shared",
                    position: (91, 24),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (82, 23),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "restartIfChanged",
                 position: (95, 7),
                },
               ],
              },
              Variable {
               identifier: "false",
               position: (95, 26),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "wantedBy",
                 position: (97, 7),
                },
               ],
              },
              List {
               elements: [
                String {
                 parts: [
                  Raw {
                   content: "graphical.target",
                   position: (97, 21),
                  },
                 ],
                },
               ],
               position: (97, 18),
              },
             ),
            ],
            recursive: false,
            position: (67, 31),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "systemd",
              position: (100, 5),
             },
             Raw {
              content: "defaultUnit",
              position: (100, 13),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "graphical.target",
              position: (100, 28),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (102, 5),
             },
             Raw {
              content: "users",
              position: (102, 11),
             },
             Raw {
              content: "greeter",
              position: (102, 17),
             },
            ],
           },
           Map {
            bindings: [
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "isSystemUser",
                 position: (103, 7),
                },
               ],
              },
              Variable {
               identifier: "true",
               position: (103, 22),
              },
             ),
             KeyValue(
              AttributePath {
               attributes: [
                Raw {
                 content: "group",
                 position: (104, 7),
                },
               ],
              },
              String {
               parts: [
                Raw {
                 content: "greeter",
                 position: (104, 16),
                },
               ],
              },
             ),
            ],
            recursive: false,
            position: (102, 27),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "users",
              position: (107, 5),
             },
             Raw {
              content: "groups",
              position: (107, 11),
             },
             Raw {
              content: "greeter",
              position: (107, 18),
             },
            ],
           },
           Map {
            bindings: [],
            recursive: false,
            position: (107, 28),
           },
          ),
         ],
         recursive: false,
         position: (54, 28),
        },
       ],
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "meta",
         position: (110, 3),
        },
        Raw {
         content: "maintainers",
         position: (110, 8),
        },
       ],
      },
      With {
       expression: Variable {
        identifier: "maintainers",
        position: (110, 27),
       },
       target: List {
        elements: [
         Variable {
          identifier: "queezle",
          position: (110, 42),
         },
        ],
        position: (110, 40),
       },
       position: (110, 22),
      },
     ),
    ],
    recursive: false,
    position: (9, 1),
   },
   position: (4, 1),
  },
  position: (2, 1),
 },
 position: (1, 1),
}