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/52-54-00-12-34-56.py2
-rw-r--r--profiles/applications/awesome.py6
-rw-r--r--profiles/applications/cinnamon.py2
-rw-r--r--profiles/applications/deepin.py5
-rw-r--r--profiles/applications/sway.py4
-rw-r--r--profiles/applications/xfce4.py4
-rw-r--r--profiles/deepin.py37
-rw-r--r--profiles/i3-gaps.py43
-rw-r--r--profiles/i3-wm.py42
-rw-r--r--profiles/xorg.py4
10 files changed, 137 insertions, 12 deletions
diff --git a/profiles/52-54-00-12-34-56.py b/profiles/52-54-00-12-34-56.py
index 679c6721..ed2c9d78 100644
--- a/profiles/52-54-00-12-34-56.py
+++ b/profiles/52-54-00-12-34-56.py
@@ -11,7 +11,7 @@ archinstall.sys_command(f'cryptsetup close /dev/mapper/luksloop', suppress_error
harddrive = archinstall.all_disks()['/dev/sda']
disk_password = '1234'
-with archinstall.Filesystem(harddrive, archinstall.GPT) as fs:
+with archinstall.Filesystem(harddrive) as fs:
# Use the entire disk instead of setting up partitions on your own
fs.use_entire_disk('luks2')
diff --git a/profiles/applications/awesome.py b/profiles/applications/awesome.py
index 793ee52b..a63c707b 100644
--- a/profiles/applications/awesome.py
+++ b/profiles/applications/awesome.py
@@ -1,10 +1,10 @@
import archinstall
+__packages__ = ["awesome", "xorg-xrandr", "xterm", "feh", "slock", "terminus-font", "gnu-free-fonts", "ttf-liberation", "xsel"]
+
installation.install_profile('xorg')
-installation.add_additional_packages(
- "awesome xorg-xrandr xterm feh slock terminus-font gnu-free-fonts ttf-liberation xsel"
-)
+installation.add_additional_packages(__packages__)
with open(f'{installation.target}/etc/X11/xinit/xinitrc', 'r') as xinitrc:
xinitrc_data = xinitrc.read()
diff --git a/profiles/applications/cinnamon.py b/profiles/applications/cinnamon.py
index de29aa09..0a1d9cc2 100644
--- a/profiles/applications/cinnamon.py
+++ b/profiles/applications/cinnamon.py
@@ -1,3 +1,3 @@
import archinstall
-installation.add_additional_packages("cinnamon system-config-printer gnome-keyring gnome-terminal blueberry metacity lightdm lightdm-gtk-greeter") \ No newline at end of file
+installation.add_additional_packages("cinnamon system-config-printer gnome-keyring gnome-terminal blueberry metacity lightdm lightdm-gtk-greeter")
diff --git a/profiles/applications/deepin.py b/profiles/applications/deepin.py
new file mode 100644
index 00000000..0db1572d
--- /dev/null
+++ b/profiles/applications/deepin.py
@@ -0,0 +1,5 @@
+import archinstall
+
+packages = "deepin deepin-terminal deepin-editor"
+
+installation.add_additional_packages(packages)
diff --git a/profiles/applications/sway.py b/profiles/applications/sway.py
index 56d7f318..59921aa0 100644
--- a/profiles/applications/sway.py
+++ b/profiles/applications/sway.py
@@ -1,3 +1,3 @@
import archinstall
-packages = "sway swaylock swayidle waybar dmenu light grim slurp pavucontrol alacritty"
-installation.add_additional_packages(packages)
+__packages__ = "sway swaylock swayidle waybar dmenu light grim slurp pavucontrol alacritty"
+installation.add_additional_packages(__packages__)
diff --git a/profiles/applications/xfce4.py b/profiles/applications/xfce4.py
index e8f659c2..9f4260da 100644
--- a/profiles/applications/xfce4.py
+++ b/profiles/applications/xfce4.py
@@ -1,3 +1,3 @@
import archinstall
-
-installation.add_additional_packages("xfce4 xfce4-goodies lightdm lightdm-gtk-greeter") \ No newline at end of file
+__packages__ = "xfce4 xfce4-goodies lightdm lightdm-gtk-greeter"
+installation.add_additional_packages(__packages__) \ No newline at end of file
diff --git a/profiles/deepin.py b/profiles/deepin.py
new file mode 100644
index 00000000..52bcdde5
--- /dev/null
+++ b/profiles/deepin.py
@@ -0,0 +1,37 @@
+# A desktop environment using "Deepin".
+
+import archinstall, os
+
+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.
+ """
+
+ # Deepin 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')
+
+
+# Ensures that this code only gets executed if executed
+# through importlib.util.spec_from_file_location("deepin", "/somewhere/deepin.py")
+# or through conventional import deepin
+if __name__ == 'deepin':
+ # Install dependency profiles
+ installation.install_profile('xorg')
+
+ # Install the application deepin from the template under /applications/
+ deepin = archinstall.Application(installation, 'deepin')
+ deepin.install()
+
+ # Enable autostart of Deepin for all users
+ installation.enable_service('lightdm')
diff --git a/profiles/i3-gaps.py b/profiles/i3-gaps.py
new file mode 100644
index 00000000..e900117a
--- /dev/null
+++ b/profiles/i3-gaps.py
@@ -0,0 +1,43 @@
+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.
+ """
+
+ # 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')
+
+def _post_install(*args, **kwargs):
+ """
+ Another magic function called after the system
+ has been installed.
+ """
+ installation.log("the installation of i3 does not conatain any configuerations for the wm. In this shell you should take your time to add your desiired configueration. Exit the shell once you are done to continue the installation.", fg="yellow")
+ try:
+ subprocess.check_call("arch-chroot /mnt",shell=True)
+ except subprocess.CallProcessError:
+ return False
+
+ return True
+
+if __name__ == 'i3-wm':
+ # 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")
+ # install the i3 group now
+ i3 = archinstall.Application(installation, 'i3-gaps')
+ i3.install()
+ # Auto start lightdm for all users
+ installation.enable_service('lightdm')
diff --git a/profiles/i3-wm.py b/profiles/i3-wm.py
new file mode 100644
index 00000000..a2449e39
--- /dev/null
+++ b/profiles/i3-wm.py
@@ -0,0 +1,42 @@
+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.
+ """
+
+ # 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')
+def _post_install(*args, **kwargs):
+ """
+ Another magic function called after the system
+ has been installed.
+ """
+ installation.log("the installation of i3 does not conatain any configuerations for the wm. In this shell you should take your time to add your desiired configueration. Exit the shell once you are done to continue the installation.", fg="yellow")
+ try:
+ subprocess.check_call("arch-chroot /mnt",shell=True)
+ except subprocess.CallProcessError:
+ return False
+
+ return True
+
+if __name__ == 'i3-wm':
+ # Install dependency profiles
+ installation.install_profile('xorg')
+ # we are installing lightdm to auto start i3
+ installation.add_additional_packages("lightdm-gtk-greeter lightdm")
+ # install the i3 group now
+ i3 = archinstall.Application(installation, 'i3-wm')
+ i3.install()
+ # Auto start lightdm for all users
+ installation.enable_service('lightdm')
diff --git a/profiles/xorg.py b/profiles/xorg.py
index 130f3ed0..8e9779bc 100644
--- a/profiles/xorg.py
+++ b/profiles/xorg.py
@@ -82,10 +82,8 @@ 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.
"""
- 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'] = select_driver(AVAILABLE_DRIVERS)
+ __builtins__['_gfx_driver_packages'] = archinstall.select_driver()
# TODO: Add language section and/or merge it with the locale selected
# earlier in for instance guided.py installer.