Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/installer.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-06-29 08:55:25 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-06-29 08:55:25 +0000
commit5ae18b80fd118cc07108694feb81e5e02a9b18f3 (patch)
treeae19f5234e465492044052a8ef4bf6029e42c1d3 /installer.py
parent89ecdee763677fd455fc9ae722632928047a791d (diff)
Starting to rework the entire codebase to be context friendly. Annotations is next after one successful install.
Diffstat (limited to 'installer.py')
-rw-r--r--installer.py22
1 files changed, 22 insertions, 0 deletions
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