Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
Diffstat (limited to 'profiles')
-rw-r--r--profiles/applications/i3-gaps.py2
-rw-r--r--profiles/applications/i3-wm.py2
-rw-r--r--profiles/applications/kde-wayland.py7
-rw-r--r--profiles/applications/kde.py5
-rw-r--r--profiles/applications/lxqt.py3
-rw-r--r--profiles/applications/sway.py3
-rw-r--r--profiles/awesome.py13
-rw-r--r--profiles/cinnamon.py (renamed from profiles/kde-wayland.py)26
-rw-r--r--profiles/desktop.py14
-rw-r--r--profiles/gnome.py2
-rw-r--r--profiles/i3-gaps.py17
-rw-r--r--profiles/i3-wm.py17
-rw-r--r--profiles/i3.py72
-rw-r--r--profiles/kde.py10
-rw-r--r--profiles/lxqt.py35
-rw-r--r--profiles/minimal.py20
-rw-r--r--profiles/sway.py24
-rw-r--r--profiles/xfce4.py35
-rw-r--r--profiles/xorg.py2
19 files changed, 279 insertions, 30 deletions
diff --git a/profiles/applications/i3-gaps.py b/profiles/applications/i3-gaps.py
new file mode 100644
index 00000000..4daed7ad
--- /dev/null
+++ b/profiles/applications/i3-gaps.py
@@ -0,0 +1,2 @@
+import archinstall
+installation.add_additional_packages("i3-gaps") \ No newline at end of file
diff --git a/profiles/applications/i3-wm.py b/profiles/applications/i3-wm.py
new file mode 100644
index 00000000..e7838a64
--- /dev/null
+++ b/profiles/applications/i3-wm.py
@@ -0,0 +1,2 @@
+import archinstall
+installation.add_additional_packages("i3-wm") \ No newline at end of file
diff --git a/profiles/applications/kde-wayland.py b/profiles/applications/kde-wayland.py
deleted file mode 100644
index 6a9be294..00000000
--- a/profiles/applications/kde-wayland.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import archinstall
-packages = "plasma-meta kde-applications-meta plasma-wayland-session sddm"
-# if the package selection can be reduced go for it
-if "nvidia" in _gfx_driver_packages:
- packages = packages + " egl-wayland"
-installation.add_additional_packages(packages)
-# We'll support plasma-desktop-wayland (minimal) later
diff --git a/profiles/applications/kde.py b/profiles/applications/kde.py
index 87a266b0..af1e6597 100644
--- a/profiles/applications/kde.py
+++ b/profiles/applications/kde.py
@@ -1,2 +1,5 @@
import archinstall
-installation.add_additional_packages("plasma-meta kde-applications-meta sddm") # We'll support plasma-desktop (minimal) later iirc sddm should be part of plasma-meta
+packages = "plasma-meta konsole kate dolphin sddm plasma-wayland-session"
+if "nvidia" in _gfx_driver_packages:
+ packages = packages + " egl-wayland"
+installation.add_additional_packages(packages)
diff --git a/profiles/applications/lxqt.py b/profiles/applications/lxqt.py
new file mode 100644
index 00000000..5ce875cc
--- /dev/null
+++ b/profiles/applications/lxqt.py
@@ -0,0 +1,3 @@
+import archinstall
+
+installation.add_additional_packages("lxqt breeze-icons oxygen-icons xdg-utils ttf-freefont leafpad slock archlinux-wallpaper sddm")
diff --git a/profiles/applications/sway.py b/profiles/applications/sway.py
new file mode 100644
index 00000000..5f66233c
--- /dev/null
+++ b/profiles/applications/sway.py
@@ -0,0 +1,3 @@
+import archinstall
+
+installation.add_additional_packages("sway sddm")
diff --git a/profiles/awesome.py b/profiles/awesome.py
index a565ccb3..0b00a424 100644
--- a/profiles/awesome.py
+++ b/profiles/awesome.py
@@ -2,6 +2,11 @@
import archinstall
+is_top_level_profile = False
+
+# New way of defining packages for a profile, which is iterable and can be used out side
+# of the profile to get a list of "what packages will be installed".
+__packages__ = ['nemo', 'gpicview-gtk3', 'scrot']
def _prep_function(*args, **kwargs):
"""
@@ -28,13 +33,7 @@ if __name__ == 'awesome':
awesome = archinstall.Application(installation, 'awesome')
awesome.install()
- # Then setup and configure the desktop environment: awesome
- editor = "nano"
- filebrowser = "nemo gpicview-gtk3"
- utils = "openssh sshfs htop scrot wget"
-
-
- installation.add_additional_packages(f"{utils} {filebrowser} {editor}")
+ installation.add_additional_packages(__packages__)
alacritty = archinstall.Application(installation, 'alacritty')
alacritty.install()
diff --git a/profiles/kde-wayland.py b/profiles/cinnamon.py
index e21f62c8..91a59811 100644
--- a/profiles/kde-wayland.py
+++ b/profiles/cinnamon.py
@@ -1,7 +1,8 @@
-# A desktop environment using "KDE".
-import archinstall, os
+# A desktop environment using "Cinnamon"
-# TODO: Remove hard dependency of bash (due to .bash_profile)
+import archinstall
+
+is_top_level_profile = False
def _prep_function(*args, **kwargs):
"""
@@ -11,7 +12,7 @@ def _prep_function(*args, **kwargs):
for more input before any other installer steps start.
"""
- # KDE requires a functioning Xorg installation.
+ # Cinnamon requires a functioning Xorg installation.
profile = archinstall.Profile(None, 'xorg')
with profile.load_instructions(namespace='xorg.py') as imported:
if hasattr(imported, '_prep_function'):
@@ -20,15 +21,14 @@ def _prep_function(*args, **kwargs):
print('Deprecated (??): xorg profile has no _prep_function() anymore')
# Ensures that this code only gets executed if executed
-# through importlib.util.spec_from_file_location("kde", "/somewhere/kde.py")
-# or through conventional import kde
-if __name__ == 'kde-wayland':
+# through importlib.util.spec_from_file_location("cinnamon", "/somewhere/cinnamon.py")
+# or through conventional import cinnamon
+if __name__ == 'cinnamon':
# Install dependency profiles
installation.install_profile('xorg')
- # Install the application kde from the template under /applications/
- kde = archinstall.Application(installation, 'kde-wayland')
- kde.install()
- print("when you login, select Plasma (Wayland) for the wayland session")
- # Enable autostart of KDE for all users
- installation.enable_service('sddm')
+ # Install the application cinnamon from the template under /applications/
+ cinnamon = archinstall.Application(installation, 'cinnamon')
+ cinnamon.install()
+
+ installation.enable_service('lightdm') # Light Display Manager
diff --git a/profiles/desktop.py b/profiles/desktop.py
index 41a2ad8b..e2850da4 100644
--- a/profiles/desktop.py
+++ b/profiles/desktop.py
@@ -2,6 +2,12 @@
import archinstall, os
+is_top_level_profile = True
+
+# New way of defining packages for a profile, which is iterable and can be used out side
+# of the profile to get a list of "what packages will be installed".
+__packages__ = ['nano', 'vim', 'openssh', 'htop', 'wget', 'iwd', 'wireless_tools', 'wpa_supplicant', 'smartmontools']
+
def _prep_function(*args, **kwargs):
"""
Magic function called by the importing installer
@@ -10,9 +16,9 @@ def _prep_function(*args, **kwargs):
for more input before any other installer steps start.
"""
- supported_desktops = ['gnome', 'kde', 'awesome']
+ supported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon', 'xfce4', 'lxqt', 'i3']
desktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ')
-
+
# Temporarily store the selected desktop profile
# in a session-safe location, since this module will get reloaded
# the next time it gets executed.
@@ -39,7 +45,11 @@ if __name__ == 'desktop':
There are plenty of desktop-turn-key-solutions based on Arch Linux,
this is therefore just a helper to get started
"""
+
+ # Install common packages for all desktop environments
+ installation.add_additional_packages(__packages__)
# TODO: Remove magic variable 'installation' and place it
# in archinstall.storage or archinstall.session/archinstall.installation
installation.install_profile(archinstall.storage['_desktop_profile'])
+
diff --git a/profiles/gnome.py b/profiles/gnome.py
index b37679de..c75cafee 100644
--- a/profiles/gnome.py
+++ b/profiles/gnome.py
@@ -2,6 +2,8 @@
import archinstall
+is_top_level_profile = False
+
def _prep_function(*args, **kwargs):
"""
Magic function called by the importing installer
diff --git a/profiles/i3-gaps.py b/profiles/i3-gaps.py
new file mode 100644
index 00000000..ddca34b7
--- /dev/null
+++ b/profiles/i3-gaps.py
@@ -0,0 +1,17 @@
+import archinstall, subprocess
+
+is_top_level_profile = False
+
+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.
+ """
+ return True
+
+if __name__ == 'i3-gaps':
+ # install the i3 group now
+ i3 = archinstall.Application(installation, 'i3-gaps')
+ i3.install()
diff --git a/profiles/i3-wm.py b/profiles/i3-wm.py
new file mode 100644
index 00000000..4a0415fc
--- /dev/null
+++ b/profiles/i3-wm.py
@@ -0,0 +1,17 @@
+import archinstall, subprocess
+
+is_top_level_profile = False
+
+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.
+ """
+ return True
+
+if __name__ == 'i3-wm':
+ # install the i3 group now
+ i3 = archinstall.Application(installation, 'i3-wm')
+ i3.install()
diff --git a/profiles/i3.py b/profiles/i3.py
new file mode 100644
index 00000000..9f58e7eb
--- /dev/null
+++ b/profiles/i3.py
@@ -0,0 +1,72 @@
+# Common package for i3, lets user select which i3 configuration they want.
+
+import archinstall, os
+
+is_top_level_profile = False
+
+# New way of defining packages for a profile, which is iterable and can be used out side
+# of the profile to get a list of "what packages will be installed".
+__packages__ = ['i3lock', 'i3status', 'i3blocks']
+
+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.
+ """
+
+ supported_configurations = ['i3-wm', 'i3-gaps']
+ desktop = archinstall.generic_select(supported_configurations, 'Select your desired configuration: ')
+
+ # Temporarily store the selected desktop profile
+ # in a session-safe location, since this module will get reloaded
+ # the next time it gets executed.
+ archinstall.storage['_desktop_profile'] = desktop
+
+ # i3 requires a functioning Xorg installation.
+ profile = archinstall.Profile(None, 'xorg')
+ with profile.load_instructions(namespace='xorg.py') as imported:
+ if hasattr(imported, '_prep_function'):
+ return imported._prep_function()
+ else:
+ print('Deprecated (??): xorg profile has no _prep_function() anymore')
+
+ profile = archinstall.Profile(None, desktop)
+ # Loading the instructions with a custom namespace, ensures that a __name__ comparison is never triggered.
+ with profile.load_instructions(namespace=f"{desktop}.py") as imported:
+ if hasattr(imported, '_prep_function'):
+ return imported._prep_function()
+ else:
+ print(f"Deprecated (??): {desktop} profile has no _prep_function() anymore")
+
+if __name__ == 'i3':
+ """
+ This "profile" is a meta-profile.
+ There are no desktop-specific steps, it simply routes
+ the installer to whichever desktop environment/window manager was chosen.
+
+ Maybe in the future, a network manager or similar things *could* be added here.
+ We should honor that Arch Linux does not officially endorse a desktop-setup, nor is
+ it trying to be a turn-key desktop distribution.
+
+ There are plenty of desktop-turn-key-solutions based on Arch Linux,
+ this is therefore just a helper to get started
+ """
+
+ # Install common packages for all i3 configurations
+ installation.add_additional_packages(__packages__)
+
+ # Install dependency profiles
+ installation.install_profile('xorg')
+
+ # gaps is installed by deafult so we are overriding it here
+ installation.add_additional_packages("lightdm-gtk-greeter lightdm")
+
+ # Auto start lightdm for all users
+ installation.enable_service('lightdm')
+
+ # TODO: Remove magic variable 'installation' and place it
+ # in archinstall.storage or archinstall.session/archinstall.installation
+ installation.install_profile(archinstall.storage['_desktop_profile'])
+
diff --git a/profiles/kde.py b/profiles/kde.py
index 32819bd5..6654dfa7 100644
--- a/profiles/kde.py
+++ b/profiles/kde.py
@@ -2,6 +2,8 @@
import archinstall, os
+is_top_level_profile = False
+
# TODO: Remove hard dependency of bash (due to .bash_profile)
def _prep_function(*args, **kwargs):
@@ -20,6 +22,14 @@ def _prep_function(*args, **kwargs):
else:
print('Deprecated (??): xorg profile has no _prep_function() anymore')
+"""
+def _post_install(*args, **kwargs):
+ if "nvidia" in _gfx_driver_packages:
+ print("Plasma Wayland has known compatibility issues with the proprietary Nvidia driver")
+ print("After booting, you can choose between Wayland and Xorg using the drop-down menu")
+ return True
+"""
+
# Ensures that this code only gets executed if executed
# through importlib.util.spec_from_file_location("kde", "/somewhere/kde.py")
# or through conventional import kde
diff --git a/profiles/lxqt.py b/profiles/lxqt.py
new file mode 100644
index 00000000..871488ee
--- /dev/null
+++ b/profiles/lxqt.py
@@ -0,0 +1,35 @@
+
+# A desktop environment using "LXQt"
+
+import archinstall
+
+is_top_level_profile = False
+
+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.
+ """
+
+ # LXQt requires a functional xorg installation.
+ profile = archinstall.Profile(None, 'xorg')
+ with profile.load_instructions(namespace='xorg.py') as imported:
+ if hasattr(imported, '_prep_function'):
+ return imported._prep_function()
+ else:
+ print('Deprecated (??): xorg profile has no _prep_function() anymore')
+
+# Ensures that this code only gets executed if executed
+# through importlib.util.spec_from_file_location("lxqt", "/somewhere/lxqt.py")
+# or through conventional import lxqt
+if __name__ == 'lxqt':
+ # Install dependency profiles
+ installation.install_profile('xorg')
+
+ # Install the application xfce4 from the template under /applications/
+ xfce = archinstall.Application(installation, 'lxqt')
+ xfce.install()
+
+ installation.enable_service('sddm') # SDDM Display Manager
diff --git a/profiles/minimal.py b/profiles/minimal.py
new file mode 100644
index 00000000..79821a89
--- /dev/null
+++ b/profiles/minimal.py
@@ -0,0 +1,20 @@
+# Used to do a minimal install
+
+import archinstall, os
+
+is_top_level_profile = True
+
+def _prep_function(*args, **kwargs):
+ """
+ Magic function called by the importing installer
+ before continuing any further. For minimal install,
+ we don't need to do anything special here, but it
+ needs to exist and return True.
+ """
+ return True # Do nothing and just return True
+
+if __name__ == 'minimal':
+ """
+ This "profile" is a meta-profile.
+ It is used for a custom minimal installation, without any desktop-specific packages.
+ """
diff --git a/profiles/sway.py b/profiles/sway.py
new file mode 100644
index 00000000..fd8407df
--- /dev/null
+++ b/profiles/sway.py
@@ -0,0 +1,24 @@
+# A desktop environment using "Sway"
+
+import archinstall
+
+is_top_level_profile = False
+
+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.
+ """
+ return True
+
+# Ensures that this code only gets executed if executed
+# through importlib.util.spec_from_file_location("sway", "/somewhere/sway.py")
+# or through conventional import sway
+if __name__ == 'sway':
+ # Install the application sway from the template under /applications/
+ sway = archinstall.Application(installation, 'sway')
+ sway.install()
+
+ installation.enable_service('sddm') # SDDM, which supports Sway
diff --git a/profiles/xfce4.py b/profiles/xfce4.py
new file mode 100644
index 00000000..fee8c37a
--- /dev/null
+++ b/profiles/xfce4.py
@@ -0,0 +1,35 @@
+
+# A desktop environment using "Xfce4"
+
+import archinstall
+
+is_top_level_profile = False
+
+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.
+ """
+
+ # XFCE requires a functional xorg installation.
+ profile = archinstall.Profile(None, 'xorg')
+ with profile.load_instructions(namespace='xorg.py') as imported:
+ if hasattr(imported, '_prep_function'):
+ return imported._prep_function()
+ else:
+ print('Deprecated (??): xorg profile has no _prep_function() anymore')
+
+# Ensures that this code only gets executed if executed
+# through importlib.util.spec_from_file_location("xfce4", "/somewhere/xfce4.py")
+# or through conventional import xfce4
+if __name__ == 'xfce4':
+ # Install dependency profiles
+ installation.install_profile('xorg')
+
+ # Install the application xfce4 from the template under /applications/
+ xfce = archinstall.Application(installation, 'xfce4')
+ xfce.install()
+
+ installation.enable_service('lightdm') # Light Display Manager
diff --git a/profiles/xorg.py b/profiles/xorg.py
index 1282b8a5..e905d533 100644
--- a/profiles/xorg.py
+++ b/profiles/xorg.py
@@ -2,6 +2,8 @@
import archinstall, os
+is_top_level_profile = True
+
AVAILABLE_DRIVERS = {
# Sub-dicts are layer-2 options to be selected
# and lists are a list of packages to be installed