Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles/wayland.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-09 08:08:53 +0000
committerGitHub <noreply@github.com>2021-04-09 08:08:53 +0000
commit3d659dead8cf06e71ad9c36db1abec3f22335414 (patch)
tree6e6c277bd976ee2e1bb5b06db98aa75b6bf22dd6 /profiles/wayland.py
parentf8bf2b313ab8c06571d44c571143c28864599223 (diff)
parentb85514ae5e4cdedf00795f165fbcd17abd2cb4fd (diff)
Merge pull request #251 from advaithm/torxed-v2.2.0
Split drivers from xorg and create a seprate profile for wayland. Remove the use of sddm from sway and raise issues with the nvidia drivers
Diffstat (limited to 'profiles/wayland.py')
-rw-r--r--profiles/wayland.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/profiles/wayland.py b/profiles/wayland.py
new file mode 100644
index 00000000..8edae3c2
--- /dev/null
+++ b/profiles/wayland.py
@@ -0,0 +1,43 @@
+import archinstall, os
+
+AVAILABLE_DRIVERS = {
+ # Sub-dicts are layer-2 options to be selected
+ # and lists are a list of packages to be installed
+ 'AMD / ATI' : {
+ 'amd' : ['xf86-video-amdgpu'],
+ 'ati' : ['xf86-video-ati']
+ },
+ 'intel' : ['xf86-video-intel'],
+ 'nvidia' : {
+ 'open source' : ['xf86-video-nouveau'],
+ 'proprietary' : ['nvidia']
+ },
+ 'mesa' : ['mesa'],
+ 'fbdev' : ['xf86-video-fbdev'],
+ 'vesa' : ['xf86-video-vesa'],
+ 'vmware' : ['xf86-video-vmware']
+}
+
+
+def _prep_function(*args, **kwargs):
+ """
+ Magic function called by the importing installer
+ before continuing any further. It also avoids executing any
+ other code in this stage. So it's a safe way to ask the user
+ for more input before any other installer steps start.
+ """
+ print('You need to select which graphics card you\'re using.')
+ print('This in order to setup the required graphics drivers.')
+
+ __builtins__['_gfx_driver_packages'] = archinstall.lib.gfx_drivers.select_driver(AVAILABLE_DRIVERS)
+
+ # TODO: Add language section and/or merge it with the locale selected
+ # earlier in for instance guided.py installer.
+
+ return True
+
+if __name__ == "__wayland__":
+ try:
+ installation.add_additional_packages(f"wayland {' '.join(_gfx_driver_packages)}")
+ except:
+ installation.add_additional_packages(f"wayland") # Prep didn't run, so there's no driver to install \ No newline at end of file