Move choice into guided installation instead of DEs
Arch wiki says packages should enable the user services automatically
This commit is contained in:
parent
9436ca7805
commit
d9984550b6
|
|
@ -90,6 +90,14 @@ def ask_for_a_timezone():
|
||||||
fg='red'
|
fg='red'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def ask_for_audio_selection():
|
||||||
|
audio = "pulseaudio" # Default for most desktop environments
|
||||||
|
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
||||||
|
if pipewire_choice == "y":
|
||||||
|
audio = "pipewire"
|
||||||
|
|
||||||
|
return audio
|
||||||
|
|
||||||
def ask_to_configure_network():
|
def ask_to_configure_network():
|
||||||
# Optionally configure one network interface.
|
# Optionally configure one network interface.
|
||||||
#while 1:
|
#while 1:
|
||||||
|
|
|
||||||
|
|
@ -182,6 +182,10 @@ def ask_user_questions():
|
||||||
)
|
)
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
# Ask about audio server selection (this right now just asks for pipewire and defaults to pulseaudio otherwise)
|
||||||
|
if not archinstall.arguments.get('audio', None):
|
||||||
|
archinstall.arguments['audio'] = archinstall.ask_for_audio_selection()
|
||||||
|
|
||||||
# Additional packages (with some light weight error handling for invalid package names)
|
# Additional packages (with some light weight error handling for invalid package names)
|
||||||
if not archinstall.arguments.get('packages', None):
|
if not archinstall.arguments.get('packages', None):
|
||||||
archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)]
|
archinstall.arguments['packages'] = [package for package in input('Write additional packages to install (space separated, leave blank to skip): ').split(' ') if len(package)]
|
||||||
|
|
@ -329,6 +333,10 @@ def perform_installation(device, boot_partition, language, mirrors):
|
||||||
installation.enable_service('systemd-networkd')
|
installation.enable_service('systemd-networkd')
|
||||||
installation.enable_service('systemd-resolved')
|
installation.enable_service('systemd-resolved')
|
||||||
|
|
||||||
|
print('This audio server will be used: ' + archinstall.arguments.get('audio', None))
|
||||||
|
if archinstall.arguments.get('audio', None) == 'pipewire':
|
||||||
|
print('Installing pipewire ...')
|
||||||
|
installation.install_profile('pipewire')
|
||||||
|
|
||||||
if archinstall.arguments.get('packages', None) and archinstall.arguments.get('packages', None)[0] != '':
|
if archinstall.arguments.get('packages', None) and archinstall.arguments.get('packages', None)[0] != '':
|
||||||
installation.add_additional_packages(archinstall.arguments.get('packages', None))
|
installation.add_additional_packages(archinstall.arguments.get('packages', None))
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import archinstall
|
import archinstall
|
||||||
|
|
||||||
__packages__ = ["pipewire", "pipewire-alsa", "pipewire-docs", "pipewire-jack", "pipewire-media-session", "pipewire-pulse", "gst-plugin-pipewire", "libpulse"]
|
packages = ["pipewire", "pipewire-alsa", "pipewire-docs", "pipewire-jack", "pipewire-media-session", "pipewire-pulse", "gst-plugin-pipewire", "libpulse"]
|
||||||
|
|
||||||
installation.add_additional_packages(__packages__)
|
installation.add_additional_packages(packages)
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,6 @@ def _prep_function(*args, **kwargs):
|
||||||
# through importlib.util.spec_from_file_location("awesome", "/somewhere/awesome.py")
|
# through importlib.util.spec_from_file_location("awesome", "/somewhere/awesome.py")
|
||||||
# or through conventional import awesome
|
# or through conventional import awesome
|
||||||
if __name__ == 'awesome':
|
if __name__ == 'awesome':
|
||||||
# Install the pipewire audio server if the user wants to use it
|
|
||||||
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
|
||||||
if choice == "y":
|
|
||||||
pipewire = archinstall.Application(installation, 'pipewire')
|
|
||||||
pipewire.install()
|
|
||||||
|
|
||||||
# Install the application awesome from the template under /applications/
|
# Install the application awesome from the template under /applications/
|
||||||
awesome = archinstall.Application(installation, 'awesome')
|
awesome = archinstall.Application(installation, 'awesome')
|
||||||
awesome.install()
|
awesome.install()
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,6 @@ def _prep_function(*args, **kwargs):
|
||||||
# through importlib.util.spec_from_file_location("cinnamon", "/somewhere/cinnamon.py")
|
# through importlib.util.spec_from_file_location("cinnamon", "/somewhere/cinnamon.py")
|
||||||
# or through conventional import cinnamon
|
# or through conventional import cinnamon
|
||||||
if __name__ == 'cinnamon':
|
if __name__ == 'cinnamon':
|
||||||
# Install the pipewire audio server if the user wants to use it
|
|
||||||
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
|
||||||
if choice == "y":
|
|
||||||
pipewire = archinstall.Application(installation, 'pipewire')
|
|
||||||
pipewire.install()
|
|
||||||
|
|
||||||
# Install dependency profiles
|
# Install dependency profiles
|
||||||
installation.install_profile('xorg')
|
installation.install_profile('xorg')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,6 @@ def _prep_function(*args, **kwargs):
|
||||||
# through importlib.util.spec_from_file_location("gnome", "/somewhere/gnome.py")
|
# through importlib.util.spec_from_file_location("gnome", "/somewhere/gnome.py")
|
||||||
# or through conventional import gnome
|
# or through conventional import gnome
|
||||||
if __name__ == 'gnome':
|
if __name__ == 'gnome':
|
||||||
# Install the pipewire audio server if the user wants to use it
|
|
||||||
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
|
||||||
if choice == "y":
|
|
||||||
pipewire = archinstall.Application(installation, 'pipewire')
|
|
||||||
pipewire.install()
|
|
||||||
|
|
||||||
# Install dependency profiles
|
# Install dependency profiles
|
||||||
installation.install_profile('xorg')
|
installation.install_profile('xorg')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,6 @@ def _post_install(*args, **kwargs):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if __name__ == 'i3-wm':
|
if __name__ == 'i3-wm':
|
||||||
# Install the pipewire audio server if the user wants to use it
|
|
||||||
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
|
||||||
if choice == "y":
|
|
||||||
pipewire = archinstall.Application(installation, 'pipewire')
|
|
||||||
pipewire.install()
|
|
||||||
|
|
||||||
# Install dependency profiles
|
# Install dependency profiles
|
||||||
installation.install_profile('xorg')
|
installation.install_profile('xorg')
|
||||||
# gaps is installed by deafult so we are overriding it here
|
# gaps is installed by deafult so we are overriding it here
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,6 @@ def _post_install(*args, **kwargs):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if __name__ == 'i3-wm':
|
if __name__ == 'i3-wm':
|
||||||
# Install the pipewire audio server if the user wants to use it
|
|
||||||
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
|
||||||
if choice == "y":
|
|
||||||
pipewire = archinstall.Application(installation, 'pipewire')
|
|
||||||
pipewire.install()
|
|
||||||
|
|
||||||
# Install dependency profiles
|
# Install dependency profiles
|
||||||
installation.install_profile('xorg')
|
installation.install_profile('xorg')
|
||||||
# we are installing lightdm to auto start i3
|
# we are installing lightdm to auto start i3
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,6 @@ def _post_install(*args, **kwargs):
|
||||||
# through importlib.util.spec_from_file_location("kde", "/somewhere/kde.py")
|
# through importlib.util.spec_from_file_location("kde", "/somewhere/kde.py")
|
||||||
# or through conventional import kde
|
# or through conventional import kde
|
||||||
if __name__ == 'kde':
|
if __name__ == 'kde':
|
||||||
# Install the pipewire audio server if the user wants to use it
|
|
||||||
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
|
||||||
if choice == "y":
|
|
||||||
pipewire = archinstall.Application(installation, 'pipewire')
|
|
||||||
pipewire.install()
|
|
||||||
|
|
||||||
# Install dependency profiles
|
# Install dependency profiles
|
||||||
installation.install_profile('xorg')
|
installation.install_profile('xorg')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,12 +23,6 @@ def _prep_function(*args, **kwargs):
|
||||||
# through importlib.util.spec_from_file_location("xfce4", "/somewhere/xfce4.py")
|
# through importlib.util.spec_from_file_location("xfce4", "/somewhere/xfce4.py")
|
||||||
# or through conventional import xfce4
|
# or through conventional import xfce4
|
||||||
if __name__ == 'xfce4':
|
if __name__ == 'xfce4':
|
||||||
# Install the pipewire audio server if the user wants to use it
|
|
||||||
pipewire_choice = input("Would you like to install the pipewire audio server? [Y/n] ").lower()
|
|
||||||
if choice == "y":
|
|
||||||
pipewire = archinstall.Application(installation, 'pipewire')
|
|
||||||
pipewire.install()
|
|
||||||
|
|
||||||
# Install dependency profiles
|
# Install dependency profiles
|
||||||
installation.install_profile('xorg')
|
installation.install_profile('xorg')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue