Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-04-27 13:33:52 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2021-04-27 13:33:52 +0200
commit5852582bbf3e754c957fb839dc8a9b0f6ed70a47 (patch)
treec82e22700860df597721dc40c22c95656afe1d3f /examples
parent85e4a85cdb1cebbf4fb8c9ad59c7531e6be06ed5 (diff)
parent831f5e4eaf66f6f1a2aed04932af064ce9314dd4 (diff)
Pulled in latest changes from torxed-v2.2.0
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/examples/guided.py b/examples/guided.py
index d5b3c41a..43aaa788 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -2,6 +2,7 @@ import getpass, time, json, os
import archinstall
from archinstall.lib.hardware import hasUEFI
from archinstall.lib.profiles import Profile
+from archinstall.lib.user_interaction import generic_select
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -186,7 +187,6 @@ def ask_user_questions():
# Ask about audio server selection if one is not already set
if not archinstall.arguments.get('audio', None):
-
# only ask for audio server selection on a desktop profile
if str(archinstall.arguments['profile']) == 'Profile(desktop)':
archinstall.arguments['audio'] = archinstall.ask_for_audio_selection()
@@ -195,6 +195,15 @@ def ask_user_questions():
# we will not try to remove packages post-installation to not have audio, as that may cause multiple issues
archinstall.arguments['audio'] = None
+ # Ask what kernel user wants:
+ if not archinstall.arguments.get("kernels", None):
+ archinstall.log(f"Here you can choose which kernel to use, leave blank for default which is 'linux'.")
+
+ if (kernel := generic_select(["linux", "linux-lts", "linux-zen", "continue"], "choose a kernel:")):
+ archinstall.arguments['kernels'] = kernel
+ else:
+ archinstall.arguments['kernels'] = 'linux'
+
# Additional packages (with some light weight error handling for invalid package names)
while True:
if not archinstall.arguments.get('packages', None):
@@ -299,7 +308,7 @@ def perform_installation(mountpoint):
Only requirement is that the block devices are
formatted and setup prior to entering this function.
"""
- with archinstall.Installer(mountpoint) as installation:
+ with archinstall.Installer(mountpoint, kernels=archinstall.arguments.get('kernels', 'linux')) as installation:
## if len(mirrors):
# Certain services might be running that affects the system during installation.
# Currently, only one such service is "reflector.service" which updates /etc/pacman.d/mirrorlist
@@ -380,4 +389,4 @@ def perform_installation(mountpoint):
pass
ask_user_questions()
-perform_installation_steps() \ No newline at end of file
+perform_installation_steps()