(arch_config_handler: ArchConfigHandler)
| 16 | |
| 17 | |
| 18 | def perform_installation(arch_config_handler: ArchConfigHandler) -> None: |
| 19 | mountpoint = arch_config_handler.args.mountpoint |
| 20 | config = arch_config_handler.config |
| 21 | |
| 22 | if not config.disk_config: |
| 23 | error('No disk configuration provided') |
| 24 | return |
| 25 | |
| 26 | disk_config = config.disk_config |
| 27 | mountpoint = disk_config.mountpoint if disk_config.mountpoint else mountpoint |
| 28 | |
| 29 | with Installer( |
| 30 | mountpoint, |
| 31 | disk_config, |
| 32 | kernels=config.kernels, |
| 33 | silent=arch_config_handler.args.silent, |
| 34 | ) as installation: |
| 35 | # Strap in the base system, add a bootloader and configure |
| 36 | # some other minor details as specified by this profile and user. |
| 37 | installation.mount_ordered_layout() |
| 38 | installation.minimal_installation() |
| 39 | installation.set_hostname('minimal-arch') |
| 40 | installation.add_bootloader(Bootloader.Systemd) |
| 41 | |
| 42 | if config.network_config: |
| 43 | install_network_config( |
| 44 | config.network_config, |
| 45 | installation, |
| 46 | config.profile_config, |
| 47 | ) |
| 48 | |
| 49 | installation.add_additional_packages(['nano', 'wget', 'git']) |
| 50 | |
| 51 | profile_config = ProfileConfiguration(MinimalProfile()) |
| 52 | profile_handler.install_profile_config(installation, profile_config) |
| 53 | |
| 54 | user = User('devel', Password(plaintext='devel'), False) |
| 55 | installation.create_users(user) |
| 56 | |
| 57 | # Once this is done, we output some useful information to the user |
| 58 | # And the installation is complete. |
| 59 | info('There are two new accounts in your installation after reboot:') |
| 60 | info(' * root (password: airoot)') |
| 61 | info(' * devel (password: devel)') |
| 62 | |
| 63 | |
| 64 | async def main(arch_config_handler: ArchConfigHandler | None = None) -> None: |
no test coverage detected