Merge remote-tracking branch 'dylanmtaylor/minimal-install-profile' into torxed-v2.2.0
This commit is contained in:
commit
75008f3f0e
|
|
@ -177,6 +177,7 @@ class Profile(Script):
|
|||
if hasattr(imported, '_prep_function'):
|
||||
return True
|
||||
return False
|
||||
|
||||
def has_post_install(self):
|
||||
with open(self.path, 'r') as source:
|
||||
source_data = source.read()
|
||||
|
|
@ -193,6 +194,11 @@ class Profile(Script):
|
|||
if hasattr(imported, '_post_install'):
|
||||
return True
|
||||
|
||||
def is_top_level_profile(self):
|
||||
with open(self.path, 'r') as source:
|
||||
source_data = source.read()
|
||||
return 'top_level_profile = True' in source_data
|
||||
|
||||
@property
|
||||
def packages(self) -> list:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import getpass, time, json, sys, signal, os
|
||||
import archinstall
|
||||
from archinstall.lib.hardware import hasUEFI
|
||||
from archinstall.lib.profiles import Profile
|
||||
|
||||
"""
|
||||
This signal-handler chain (and global variable)
|
||||
|
|
@ -167,7 +168,7 @@ def ask_user_questions():
|
|||
|
||||
# Ask for archinstall-specific profiles (such as desktop environments etc)
|
||||
if not archinstall.arguments.get('profile', None):
|
||||
archinstall.arguments['profile'] = archinstall.select_profile(archinstall.list_profiles())
|
||||
archinstall.arguments['profile'] = archinstall.select_profile(filter(lambda profile: (Profile(None, profile).is_top_level_profile()), archinstall.list_profiles()))
|
||||
else:
|
||||
archinstall.arguments['profile'] = archinstall.list_profiles()[archinstall.arguments['profile']]
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
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__ = ['nano', 'nemo', 'gpicview-gtk3', 'openssh', 'sshfs', 'htop', 'scrot', 'wget']
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
# A desktop environment using "Cinnamon"
|
||||
import archinstall
|
||||
|
||||
is_top_level_profile = False
|
||||
|
||||
def _prep_function(*args, **kwargs):
|
||||
"""
|
||||
Magic function called by the importing installer
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
import archinstall, os
|
||||
|
||||
is_top_level_profile = True
|
||||
|
||||
def _prep_function(*args, **kwargs):
|
||||
"""
|
||||
Magic function called by the importing installer
|
||||
|
|
@ -10,7 +12,7 @@ def _prep_function(*args, **kwargs):
|
|||
for more input before any other installer steps start.
|
||||
"""
|
||||
|
||||
supported_desktops = ['gnome', 'kde', 'awesome', 'xfce4', 'cinnamon']
|
||||
supported_desktops = ['gnome', 'kde', 'awesome', 'xfce4', 'cinnamon', 'i3-gaps', 'i3-wm']
|
||||
desktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ')
|
||||
|
||||
# Temporarily store the selected desktop profile
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
import archinstall
|
||||
|
||||
is_top_level_profile = False
|
||||
|
||||
def _prep_function(*args, **kwargs):
|
||||
"""
|
||||
Magic function called by the importing installer
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import archinstall, subprocess
|
||||
|
||||
is_top_level_profile = False
|
||||
|
||||
def _prep_function(*args, **kwargs):
|
||||
"""
|
||||
Magic function called by the importing installer
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
import archinstall, subprocess
|
||||
|
||||
is_top_level_profile = False
|
||||
|
||||
def _prep_function(*args, **kwargs):
|
||||
"""
|
||||
Magic function called by the importing installer
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
"""
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
# A desktop environment using "Xfce4"
|
||||
|
||||
is_top_level_profile = False
|
||||
|
||||
import archinstall
|
||||
|
||||
def _prep_function(*args, **kwargs):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue