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/cockpit.py9
-rw-r--r--profiles/i3.py4
-rw-r--r--profiles/server.py30
-rw-r--r--profiles/sway.py36
4 files changed, 69 insertions, 10 deletions
diff --git a/profiles/applications/cockpit.py b/profiles/applications/cockpit.py
new file mode 100644
index 00000000..f1cea1d2
--- /dev/null
+++ b/profiles/applications/cockpit.py
@@ -0,0 +1,9 @@
+import archinstall
+
+# Define the package list in order for lib to source
+# which packages will be installed by this profile
+__packages__ = ["cockpit", "udisks2", "packagekit"]
+
+installation.add_additional_packages(__packages__)
+
+installation.enable_service('cockpit.socket')
diff --git a/profiles/i3.py b/profiles/i3.py
index 4d400468..8492d36f 100644
--- a/profiles/i3.py
+++ b/profiles/i3.py
@@ -6,7 +6,7 @@ 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', 'xterm', 'lightdm-gtk-greeter', 'lightdm']
+__packages__ = ['i3lock', 'i3status', 'i3blocks', 'xterm', 'lightdm-gtk-greeter', 'lightdm', 'dmenu']
def _prep_function(*args, **kwargs):
"""
@@ -60,4 +60,4 @@ if __name__ == 'i3':
installation.enable_service('lightdm')
# install the i3 group now
- installation.add_additional_packages(installation, archinstall.storage['_i3_configuration']) \ No newline at end of file
+ installation.add_additional_packages(archinstall.storage['_i3_configuration'])
diff --git a/profiles/server.py b/profiles/server.py
new file mode 100644
index 00000000..9d28054d
--- /dev/null
+++ b/profiles/server.py
@@ -0,0 +1,30 @@
+# Used to select various server application profiles on top of a minimal installation.
+
+import archinstall, os, logging
+
+is_top_level_profile = True
+
+available_servers = ["cockpit", "docker", "httpd", "lighttpd", "mariadb", "nginx", "postgresql", "sshd", "tomcat"]
+
+def _prep_function(*args, **kwargs):
+ """
+ Magic function called by the importing installer
+ before continuing any further.
+ """
+ selected_servers = archinstall.generic_multi_select(available_servers, f"Choose which servers to install and enable (leave blank for a minimal installation): ")
+ archinstall.storage['_selected_servers'] = selected_servers
+
+ return True
+
+if __name__ == 'server':
+ """
+ This "profile" is a meta-profile.
+ """
+ archinstall.log(f'Now installing the selected servers.', level=logging.INFO)
+ archinstall.log(archinstall.storage['_selected_servers'], level=logging.DEBUG)
+ for server in archinstall.storage['_selected_servers']:
+ archinstall.log(f'Installing {server} ...', level=logging.INFO)
+ app = archinstall.Application(installation, server)
+ app.install()
+
+ archinstall.log('If your selections included multiple servers with the same port, you may have to reconfigure them.', fg="yellow", level=logging.INFO)
diff --git a/profiles/sway.py b/profiles/sway.py
index db94ae2c..8e256a87 100644
--- a/profiles/sway.py
+++ b/profiles/sway.py
@@ -4,7 +4,19 @@ import archinstall
is_top_level_profile = False
-__packages__ = ["sway", "swaylock", "swayidle", "waybar", "dmenu", "light", "grim", "slurp", "pavucontrol", "alacritty"]
+__packages__ = [
+ "sway",
+ "swaylock",
+ "swayidle",
+ "waybar",
+ "dmenu",
+ "light",
+ "grim",
+ "slurp",
+ "pavucontrol",
+ "alacritty",
+]
+
def _prep_function(*args, **kwargs):
"""
@@ -13,18 +25,26 @@ def _prep_function(*args, **kwargs):
other code in this stage. So it's a safe way to ask the user
for more input before any other installer steps start.
"""
- if "nvidia" in _gfx_driver_packages:
- choice = input("The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] ")
- if choice.lower() in ("n", ""):
- raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not support the proprietary nvidia drivers.")
-
- __builtins__['_gfx_driver_packages'] = archinstall.select_driver()
+ __builtins__["_gfx_driver_packages"] = archinstall.select_driver()
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':
+if __name__ == "sway":
+ if "nvidia" in _gfx_driver_packages:
+ choice = input(
+ "The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] "
+ )
+ if choice.lower() in ("n", ""):
+ raise archinstall.lib.exceptions.HardwareIncompatibilityError(
+ "Sway does not support the proprietary nvidia drivers."
+ )
+
# Install the Sway packages
installation.add_additional_packages(__packages__)
+
+ # Install the graphics driver packages
+ installation.add_additional_packages(_gfx_driver_packages)