---
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: (5, 6),
  },
  target: LetIn {
   bindings: [
    KeyValue(
     AttributePath {
      attributes: [
       Raw {
        content: "cfg",
        position: (9, 3),
       },
      ],
     },
     PropertyAccess {
      expression: Variable {
       identifier: "config",
       position: (9, 9),
      },
      attribute_path: AttributePath {
       attributes: [
        Raw {
         content: "programs",
         position: (9, 16),
        },
        Raw {
         content: "xonsh",
         position: (9, 25),
        },
       ],
      },
      default: None,
     },
    ),
   ],
   target: Map {
    bindings: [
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "options",
         position: (15, 3),
        },
       ],
      },
      Map {
       bindings: [
        KeyValue(
         AttributePath {
          attributes: [
           Raw {
            content: "programs",
            position: (17, 5),
           },
           Raw {
            content: "xonsh",
            position: (17, 14),
           },
          ],
         },
         Map {
          bindings: [
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "enable",
               position: (19, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (19, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (20, 9),
                   },
                  ],
                 },
                 Variable {
                  identifier: "false",
                  position: (20, 19),
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (21, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Whether to configure xonsh as an interactive shell.\n",
                    position: (22, 1),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (24, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (24, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "bool",
                     position: (24, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (19, 25),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "package",
               position: (27, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (27, 17),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (28, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (28, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "package",
                     position: (28, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (29, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "pkgs",
                   position: (29, 19),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "xonsh",
                     position: (29, 24),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "defaultText",
                    position: (30, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (30, 23),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.xonsh",
                      position: (30, 42),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "example",
                    position: (31, 9),
                   },
                  ],
                 },
                 FunctionApplication {
                  function: Variable {
                   identifier: "literalExpression",
                   position: (31, 19),
                  },
                  arguments: [
                   String {
                    parts: [
                     Raw {
                      content: "pkgs.xonsh.override { configFile = \"/path/to/xonshrc\"; }",
                      position: (31, 38),
                     },
                    ],
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (32, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "xonsh package to use.\n",
                    position: (33, 1),
                   },
                  ],
                 },
                ),
               ],
               recursive: false,
               position: (27, 26),
              },
             ],
            },
           ),
           KeyValue(
            AttributePath {
             attributes: [
              Raw {
               content: "config",
               position: (37, 7),
              },
             ],
            },
            FunctionApplication {
             function: Variable {
              identifier: "mkOption",
              position: (37, 16),
             },
             arguments: [
              Map {
               bindings: [
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "default",
                    position: (38, 9),
                   },
                  ],
                 },
                 String {
                  parts: [],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "description",
                    position: (39, 9),
                   },
                  ],
                 },
                 String {
                  parts: [
                   Raw {
                    content: "Control file to customize your shell behavior.",
                    position: (39, 24),
                   },
                  ],
                 },
                ),
                KeyValue(
                 AttributePath {
                  attributes: [
                   Raw {
                    content: "type",
                    position: (40, 9),
                   },
                  ],
                 },
                 PropertyAccess {
                  expression: Variable {
                   identifier: "types",
                   position: (40, 16),
                  },
                  attribute_path: AttributePath {
                   attributes: [
                    Raw {
                     content: "lines",
                     position: (40, 22),
                    },
                   ],
                  },
                  default: None,
                 },
                ),
               ],
               recursive: false,
               position: (37, 25),
              },
             ],
            },
           ),
          ],
          recursive: false,
          position: (17, 22),
         },
        ),
       ],
       recursive: false,
       position: (15, 13),
      },
     ),
     KeyValue(
      AttributePath {
       attributes: [
        Raw {
         content: "config",
         position: (47, 3),
        },
       ],
      },
      FunctionApplication {
       function: Variable {
        identifier: "mkIf",
        position: (47, 12),
       },
       arguments: [
        PropertyAccess {
         expression: Variable {
          identifier: "cfg",
          position: (47, 17),
         },
         attribute_path: AttributePath {
          attributes: [
           Raw {
            content: "enable",
            position: (47, 21),
           },
          ],
         },
         default: None,
        },
        Map {
         bindings: [
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (49, 5),
             },
             Raw {
              content: "etc",
              position: (49, 17),
             },
             Raw {
              content: "xonshrc",
              position: (49, 21),
             },
             Raw {
              content: "text",
              position: (49, 29),
             },
            ],
           },
           String {
            parts: [
             Raw {
              content: "# /etc/xonshrc: DO NOT EDIT -- this file has been generated automatically.\n\n\nif not ",
              position: (50, 1),
             },
             Raw {
              content: "$",
              position: (53, 14),
             },
             Raw {
              content: "{...}.get('__NIXOS_SET_ENVIRONMENT_DONE'):\n    # The NixOS environment and thereby also $PATH\n    # haven't been fully set up at this point. But\n    # `source-bash` below requires `bash` to be on $PATH,\n    # so add an entry with bash's location:\n    $PATH.add(",
              position: (53, 17),
             },
             Raw {
              content: "'",
              position: (58, 21),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "pkgs",
                position: (58, 24),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "bash",
                  position: (58, 29),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "/bin')\n\n    # Stash xonsh's ls alias, so that we don't get a collision\n    # with Bash's ls alias from environment.shellAliases:\n    _ls_alias = aliases.pop('ls', None)\n\n    # Source the NixOS environment config.\n    source-bash \"",
              position: (58, 34),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "config",
                position: (65, 26),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "system",
                  position: (65, 33),
                 },
                 Raw {
                  content: "build",
                  position: (65, 40),
                 },
                 Raw {
                  content: "setEnvironment",
                  position: (65, 46),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "\"\n\n    # Restore xonsh's ls alias, overriding that from Bash (if any).\n    if _ls_alias is not None:\n        aliases['ls'] = _ls_alias\n    del _ls_alias\n\n\n",
              position: (65, 61),
             },
             Expression {
              expression: PropertyAccess {
               expression: Variable {
                identifier: "cfg",
                position: (73, 9),
               },
               attribute_path: AttributePath {
                attributes: [
                 Raw {
                  content: "config",
                  position: (73, 13),
                 },
                ],
               },
               default: None,
              },
             },
             Raw {
              content: "\n",
              position: (73, 20),
             },
            ],
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (76, 5),
             },
             Raw {
              content: "systemPackages",
              position: (76, 17),
             },
            ],
           },
           List {
            elements: [
             PropertyAccess {
              expression: Variable {
               identifier: "cfg",
               position: (76, 36),
              },
              attribute_path: AttributePath {
               attributes: [
                Raw {
                 content: "package",
                 position: (76, 40),
                },
               ],
              },
              default: None,
             },
            ],
            position: (76, 34),
           },
          ),
          KeyValue(
           AttributePath {
            attributes: [
             Raw {
              content: "environment",
              position: (78, 5),
             },
             Raw {
              content: "shells",
              position: (78, 17),
             },
            ],
           },
           List {
            elements: [
             String {
              parts: [
               Raw {
                content: "/run/current-system/sw/bin/xonsh",
                position: (79, 10),
               },
              ],
             },
             String {
              parts: [
               Expression {
                expression: PropertyAccess {
                 expression: Variable {
                  identifier: "cfg",
                  position: (80, 12),
                 },
                 attribute_path: AttributePath {
                  attributes: [
                   Raw {
                    content: "package",
                    position: (80, 16),
                   },
                  ],
                 },
                 default: None,
                },
               },
               Raw {
                content: "/bin/xonsh",
                position: (80, 24),
               },
              ],
             },
            ],
            position: (79, 7),
           },
          ),
         ],
         recursive: false,
         position: (47, 28),
        },
       ],
      },
     ),
    ],
    recursive: false,
    position: (13, 1),
   },
   position: (7, 1),
  },
  position: (5, 1),
 },
 position: (3, 1),
}