From 5ae18b80fd118cc07108694feb81e5e02a9b18f3 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Mon, 29 Jun 2020 08:55:25 +0000 Subject: Starting to rework the entire codebase to be context friendly. Annotations is next after one successful install. --- installer.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 installer.py (limited to 'installer.py') diff --git a/installer.py b/installer.py new file mode 100644 index 00000000..5c7d4467 --- /dev/null +++ b/installer.py @@ -0,0 +1,22 @@ +import archinstall, getpass + +selected_hdd = archinstall.select_disk(archinstall.all_disks()) +disk_password = getpass.getpass(prompt='Disk password (won\'t echo): ') + +with archinstall.Formatter(selected_hdd, archinstall.GPT) as formatter: + exit(1) + disk.encrypt('luks2', password=disk_password, key_size=512, hash_type='sha512', iter_time=10000, key_file='./pwfile') + + root_partition = disk.partition['/'] + +with archinstall.installer(root_partition, hostname='testmachine') as installation: + if installation.minimal_installation(): + installation.add_bootloader() + + installation.add_additional_packages(['nano', 'wget', 'git']) + installation.install_profile('desktop') + + installation.user_create('anton', 'test') + installation.user_set_pw('root', 'toor') + + installation.add_AUR_support() \ No newline at end of file -- cgit v1.2.3-70-g09d2