Add minimal profile and implement idea of 'top-level' profiles

This commit is contained in:
Dylan Taylor 2021-04-07 08:37:39 -04:00
parent 04bc9ce05f
commit ac7d980f89
10 changed files with 41 additions and 0 deletions

View File

@ -2,6 +2,8 @@
import archinstall import archinstall
is_top_level_profile = False
# New way of defining packages for a profile, which is iterable and can be used out side # 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". # of the profile to get a list of "what packages will be installed".
__packages__ = ['nano', 'nemo', 'gpicview-gtk3', 'openssh', 'sshfs', 'htop', 'scrot', 'wget'] __packages__ = ['nano', 'nemo', 'gpicview-gtk3', 'openssh', 'sshfs', 'htop', 'scrot', 'wget']

View File

@ -1,6 +1,8 @@
# A desktop environment using "Cinnamon" # A desktop environment using "Cinnamon"
import archinstall import archinstall
is_top_level_profile = False
def _prep_function(*args, **kwargs): def _prep_function(*args, **kwargs):
""" """
Magic function called by the importing installer Magic function called by the importing installer

View File

@ -2,6 +2,8 @@
import archinstall, os import archinstall, os
is_top_level_profile = True
def _prep_function(*args, **kwargs): def _prep_function(*args, **kwargs):
""" """
Magic function called by the importing installer Magic function called by the importing installer

View File

@ -2,6 +2,8 @@
import archinstall import archinstall
is_top_level_profile = False
def _prep_function(*args, **kwargs): def _prep_function(*args, **kwargs):
""" """
Magic function called by the importing installer Magic function called by the importing installer

View File

@ -1,5 +1,7 @@
import archinstall, subprocess import archinstall, subprocess
is_top_level_profile = False
def _prep_function(*args, **kwargs): def _prep_function(*args, **kwargs):
""" """
Magic function called by the importing installer Magic function called by the importing installer

View File

@ -1,5 +1,7 @@
import archinstall, subprocess import archinstall, subprocess
is_top_level_profile = False
def _prep_function(*args, **kwargs): def _prep_function(*args, **kwargs):
""" """
Magic function called by the importing installer Magic function called by the importing installer

View File

@ -2,6 +2,8 @@
import archinstall, os import archinstall, os
is_top_level_profile = False
# TODO: Remove hard dependency of bash (due to .bash_profile) # TODO: Remove hard dependency of bash (due to .bash_profile)
def _prep_function(*args, **kwargs): def _prep_function(*args, **kwargs):

23
profiles/minimal.py Normal file
View File

@ -0,0 +1,23 @@
# 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. 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.
"""
# Do nothing here for now
if __name__ == 'minimal':
"""
This "profile" is a meta-profile.
It is used for a custom minimal installation, without any desktop-specific packages.
"""
# Do nothing here for now

View File

@ -1,6 +1,8 @@
# A desktop environment using "Xfce4" # A desktop environment using "Xfce4"
is_top_level_profile = False
import archinstall import archinstall
def _prep_function(*args, **kwargs): def _prep_function(*args, **kwargs):

View File

@ -2,6 +2,8 @@
import archinstall, os import archinstall, os
is_top_level_profile = True
AVAILABLE_DRIVERS = { AVAILABLE_DRIVERS = {
# Sub-dicts are layer-2 options to be selected # Sub-dicts are layer-2 options to be selected
# and lists are a list of packages to be installed # and lists are a list of packages to be installed