index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | profiles/applications/budgie.py | 4 | ||||
-rw-r--r-- | profiles/applications/cinnamon.py | 3 | ||||
-rw-r--r-- | profiles/applications/i3-gaps.py | 2 | ||||
-rw-r--r-- | profiles/applications/i3-wm.py | 2 | ||||
-rw-r--r-- | profiles/applications/lxqt.py | 3 | ||||
-rw-r--r-- | profiles/applications/mate.py | 3 | ||||
-rw-r--r-- | profiles/applications/sway.py | 4 | ||||
-rw-r--r-- | profiles/applications/xfce4.py | 5 | ||||
-rw-r--r-- | profiles/awesome.py | 2 | ||||
-rw-r--r-- | profiles/budgie.py | 56 | ||||
-rw-r--r-- | profiles/cinnamon.py | 1 | ||||
-rw-r--r-- | profiles/desktop.py | 12 | ||||
-rw-r--r-- | profiles/i3.py | 63 | ||||
-rw-r--r-- | profiles/kde.py | 2 | ||||
-rw-r--r-- | profiles/lxqt.py | 35 | ||||
-rw-r--r-- | profiles/mate.py | 34 | ||||
-rw-r--r-- | profiles/sway.py | 37 | ||||
-rw-r--r-- | profiles/xfce4.py | 4 |
diff --git a/profiles/applications/budgie.py b/profiles/applications/budgie.py new file mode 100644 index 00000000..ccec4e14 --- /dev/null +++ b/profiles/applications/budgie.py @@ -0,0 +1,4 @@ +import archinstall + +# "It is recommended also to install the gnome group, which contains applications required for the standard GNOME experience." - Arch Wiki +installation.add_additional_packages("budgie-desktop lightdm lightdm-gtk-greeter gnome")
\ No newline at end of file diff --git a/profiles/applications/cinnamon.py b/profiles/applications/cinnamon.py index af1cbee2..0a1d9cc2 100644 --- a/profiles/applications/cinnamon.py +++ b/profiles/applications/cinnamon.py @@ -1,4 +1,3 @@ import archinstall -installation.add_additional_packages("cinnamon system-config-printer gnome-keyring gnome-terminal blueberry metacity lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings") -# We'll create a cinnamon-minimal later, but for now, we'll avoid issues by giving more than we need. +installation.add_additional_packages("cinnamon system-config-printer gnome-keyring gnome-terminal blueberry metacity lightdm lightdm-gtk-greeter") diff --git a/profiles/applications/i3-gaps.py b/profiles/applications/i3-gaps.py index 4dd95989..4daed7ad 100644 --- a/profiles/applications/i3-gaps.py +++ b/profiles/applications/i3-gaps.py @@ -1,2 +1,2 @@ import archinstall -installation.add_additional_packages("i3lock i3status i3blocks i3-gaps")
\ No newline at end of file +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 index 8662497d..e7838a64 100644 --- a/profiles/applications/i3-wm.py +++ b/profiles/applications/i3-wm.py @@ -1,2 +1,2 @@ import archinstall -installation.add_additional_packages("i3lock i3status i3blocks i3-wm")
\ No newline at end of file +installation.add_additional_packages("i3-wm")
\ No newline at end of file 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/mate.py b/profiles/applications/mate.py new file mode 100644 index 00000000..24d6be47 --- /dev/null +++ b/profiles/applications/mate.py @@ -0,0 +1,3 @@ +import archinstall + +installation.add_additional_packages("mate mate-extra lightdm lightdm-gtk-greeter")
\ No newline at end of file diff --git a/profiles/applications/sway.py b/profiles/applications/sway.py index 7434c62a..59921aa0 100644 --- a/profiles/applications/sway.py +++ b/profiles/applications/sway.py @@ -1,3 +1,3 @@ import archinstall -packages = "sway swaylock swayidle dmenu alacritty" -installation.add_additional_packages(packages)
\ No newline at end of file +__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 6d6f8f7c..9f4260da 100644 --- a/profiles/applications/xfce4.py +++ b/profiles/applications/xfce4.py @@ -1,4 +1,3 @@ import archinstall - -installation.add_additional_packages("xfce4 xfce4-goodies lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings") -# We'll create a xfce4-minimal later, but for now, we'll avoid issues by giving more than we need. +__packages__ = "xfce4 xfce4-goodies lightdm lightdm-gtk-greeter" +installation.add_additional_packages(__packages__)
\ No newline at end of file diff --git a/profiles/awesome.py b/profiles/awesome.py index 0d133962..0b00a424 100644 --- a/profiles/awesome.py +++ b/profiles/awesome.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__ = ['nano', 'nemo', 'gpicview-gtk3', 'openssh', 'sshfs', 'htop', 'scrot', 'wget'] +__packages__ = ['nemo', 'gpicview-gtk3', 'scrot'] def _prep_function(*args, **kwargs): """ diff --git a/profiles/budgie.py b/profiles/budgie.py new file mode 100644 index 00000000..1f224209 --- /dev/null +++ b/profiles/budgie.py @@ -0,0 +1,56 @@ +<<<<<<< HEAD:profiles/cinnamon.py +# A desktop environment using "Cinnamon" +import archinstall + +======= +# A desktop environment using "budgie" + +import archinstall + +>>>>>>> master:profiles/budgie.py +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. + """ + +<<<<<<< HEAD:profiles/cinnamon.py + # Cinnamon requires a functioning Xorg installation. +======= + # budgie requires a functioning Xorg installation. +>>>>>>> master:profiles/budgie.py + 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 +<<<<<<< HEAD:profiles/cinnamon.py +# 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 cinnamon from the template under /applications/ + cinnamon = archinstall.Application(installation, 'cinnamon') + cinnamon.install() +======= +# through importlib.util.spec_from_file_location("budgie", "/somewhere/budgie.py") +# or through conventional import budgie +if __name__ == 'budgie': + # Install dependency profiles + installation.install_profile('xorg') + + # Install the application budgie from the template under /applications/ + budgie = archinstall.Application(installation, 'budgie') + budgie.install() +>>>>>>> master:profiles/budgie.py + + installation.enable_service('lightdm') # Light Display Manager diff --git a/profiles/cinnamon.py b/profiles/cinnamon.py index 1a796bc7..91a59811 100644 --- a/profiles/cinnamon.py +++ b/profiles/cinnamon.py @@ -1,4 +1,5 @@ # A desktop environment using "Cinnamon" + import archinstall is_top_level_profile = False diff --git a/profiles/desktop.py b/profiles/desktop.py index 22a407b6..846182e2 100644 --- a/profiles/desktop.py +++ b/profiles/desktop.py @@ -4,6 +4,10 @@ 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', 'xdg-utils'] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -12,9 +16,9 @@ def _prep_function(*args, **kwargs): for more input before any other installer steps start. """ - supported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon', 'xfce4', 'lxqt', 'i3', 'budgie'] + supported_desktops = ['gnome', 'kde', 'awesome', 'sway', 'cinnamon', 'xfce4', 'lxqt', 'i3', 'budgie', 'mate'] 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. @@ -41,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/i3.py b/profiles/i3.py new file mode 100644 index 00000000..67028b2d --- /dev/null +++ b/profiles/i3.py @@ -0,0 +1,63 @@ +# 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', 'xterm'] + +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['_i3_configuration'] = 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') + +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') + + # install the i3 group now + i3 = archinstall.Application(installation, archinstall.storage['_i3_configuration']) + i3.install() diff --git a/profiles/kde.py b/profiles/kde.py index d6abe029..6654dfa7 100644 --- a/profiles/kde.py +++ b/profiles/kde.py @@ -22,11 +22,13 @@ 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") 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/mate.py b/profiles/mate.py new file mode 100644 index 00000000..b4c697b1 --- /dev/null +++ b/profiles/mate.py @@ -0,0 +1,34 @@ +# A desktop environment using "MATE" + +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. + """ + + # MATE 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("mate", "/somewhere/mate.py") +# or through conventional import mate +if __name__ == 'mate': + # Install dependency profiles + installation.install_profile('xorg') + + # Install the application mate from the template under /applications/ + mate = archinstall.Application(installation, 'mate') + mate.install() + + installation.enable_service('lightdm') # Light Display Manager diff --git a/profiles/sway.py b/profiles/sway.py index f1d2c1f1..5633cce2 100644 --- a/profiles/sway.py +++ b/profiles/sway.py @@ -1,6 +1,8 @@ -import archinstall, os +# A desktop environment using "Sway" -# TODO: Remove hard dependency of bash (due to .bash_profile) +import archinstall + +is_top_level_profile = False def _prep_function(*args, **kwargs): """ @@ -9,37 +11,12 @@ 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. """ - - __builtins__['_gfx_driver_packages'] = archinstall.select_driver() - return True -def _post_install(*args, **kwargs): - choice = input("Would you like to autostart sway on login [Y/n]: ") - if choice.lower == "y": - with open(f"{installation.mountpoint}/etc/profile", "a") as f: - x = """ - if [ -z $DISPLAY ] && [ "$(tty)" == "/dev/tty1" ]; then - exec sway - fi - """ - f.write(x) - f.close() - else: - installation.log("To start Sway, run the 'sway' command after logging in.") - # 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 +# through importlib.util.spec_from_file_location("sway", "/somewhere/sway.py") +# or through conventional import sway if __name__ == 'sway': - - installation.add_additional_packages(_gfx_driver_packages) - - # Install dependency profiles - if _gfx_driver_packages == 'nvidia': - # NOTE: This is technically runnable with the --my-next-gpu-wont-be-nvidia option - raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not officially support the proprietary Nvidia driver, you may have to use nouveau.") - - # Install the application kde from the template under /applications/ + # Install the application sway from the template under /applications/ sway = archinstall.Application(installation, 'sway') sway.install() diff --git a/profiles/xfce4.py b/profiles/xfce4.py index c8637eda..fee8c37a 100644 --- a/profiles/xfce4.py +++ b/profiles/xfce4.py @@ -1,10 +1,10 @@ # A desktop environment using "Xfce4" -is_top_level_profile = False - import archinstall +is_top_level_profile = False + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer |