From 4ff35663b80e1bb40c44d4ceee85700ef428cab0 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Wed, 12 May 2021 13:55:41 +0200 Subject: Replaced the magic __builtin__ global variable. This should fix mypy complaints while still retaining the same functionality, kinda. It's less automatic but it's also less of dark magic, which makes sense for anyone but me. --- profiles/xorg.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'profiles/xorg.py') diff --git a/profiles/xorg.py b/profiles/xorg.py index 7546a01b..19ca92d7 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -28,22 +28,12 @@ def _prep_function(*args, **kwargs): if __name__ == 'xorg': try: if "nvidia" in _gfx_driver_packages: - if "linux-zen" in installation.base_packages or "linux-lts" in installation.base_packages: - installation.add_additional_packages("dkms")#I've had kernel regen fail if it wasn't installed before nvidia-dkms - installation.add_additional_packages("xorg-server xorg-xinit nvidia-dkms") + if "linux-zen" in archinstall.storage['installation_session'].base_packages or "linux-lts" in archinstall.storage['installation_session'].base_packages: + archinstall.storage['installation_session'].add_additional_packages("dkms")#I've had kernel regen fail if it wasn't installed before nvidia-dkms + archinstall.storage['installation_session'].add_additional_packages("xorg-server xorg-xinit nvidia-dkms") else: - installation.add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") + archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") else: - installation.add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") + archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") except: - installation.add_additional_packages(f"xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install - - # with open(f'{installation.mountpoint}/etc/X11/xinit/xinitrc', 'a') as X11: - # X11.write('setxkbmap se\n') - - # with open(f'{installation.mountpoint}/etc/vconsole.conf', 'a') as vconsole: - # vconsole.write('KEYMAP={keyboard_layout}\n'.format(**arguments)) - # vconsole.write('FONT=lat9w-16\n') - - # awesome = archinstall.Application(installation, 'awesome') - # awesome.install() \ No newline at end of file + archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install \ No newline at end of file -- cgit v1.2.3-70-g09d2 From ffd5b5f80453a609b76e050d6d4e8309c540c28e Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 11:35:18 -0400 Subject: Very selectively fix some PEP 8 issues with profiles --- profiles/52-54-00-12-34-56.py | 4 ++-- profiles/applications/postgresql.py | 2 +- profiles/awesome.py | 3 ++- profiles/budgie.py | 6 ++++-- profiles/cinnamon.py | 15 +++++++++++-- profiles/deepin.py | 1 + profiles/desktop.py | 42 ++++++++++++++++++++++++++++++------- profiles/enlightenment.py | 1 + profiles/gnome.py | 4 +++- profiles/i3.py | 9 +++++--- profiles/kde.py | 2 ++ profiles/lxqt.py | 5 +++-- profiles/mate.py | 4 +++- profiles/minimal.py | 4 +++- profiles/server.py | 4 +++- profiles/sway.py | 4 +--- profiles/xfce4.py | 5 +++-- profiles/xorg.py | 1 + 18 files changed, 86 insertions(+), 30 deletions(-) (limited to 'profiles/xorg.py') diff --git a/profiles/52-54-00-12-34-56.py b/profiles/52-54-00-12-34-56.py index 28cd14f6..d4fc3d07 100644 --- a/profiles/52-54-00-12-34-56.py +++ b/profiles/52-54-00-12-34-56.py @@ -7,7 +7,7 @@ __packages__ = ['nano', 'wget', 'git'] if __name__ == '52-54-00-12-34-56': awesome = archinstall.Application(archinstall.storage['installation_session'], 'postgresql') awesome.install() - + """ # Unmount and close previous runs (Mainly only used for re-runs, but won't hurt.) archinstall.sys_command(f'umount -R /mnt', suppress_errors=True) @@ -57,4 +57,4 @@ with archinstall.Filesystem(harddrive) as fs: urllib.request.urlopen(req, timeout=5) except: pass -""" \ No newline at end of file +""" diff --git a/profiles/applications/postgresql.py b/profiles/applications/postgresql.py index 3f8c6950..29546d78 100644 --- a/profiles/applications/postgresql.py +++ b/profiles/applications/postgresql.py @@ -8,4 +8,4 @@ archinstall.storage['installation_session'].add_additional_packages(__packages__ archinstall.storage['installation_session'].arch_chroot("initdb -D /var/lib/postgres/data", runas='postgres') -archinstall.storage['installation_session'].enable_service('postgresql') \ No newline at end of file +archinstall.storage['installation_session'].enable_service('postgresql') diff --git a/profiles/awesome.py b/profiles/awesome.py index ee812eb3..62cb9e00 100644 --- a/profiles/awesome.py +++ b/profiles/awesome.py @@ -8,6 +8,7 @@ is_top_level_profile = False # of the profile to get a list of "what packages will be installed". __packages__ = ['nemo', 'gpicview', 'main', 'alacritty'] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -46,7 +47,7 @@ if __name__ == 'awesome': fh.write(awesome_lua) ## TODO: Configure the right-click-menu to contain the above packages that were installed. (as a user config) - + ## Remove some interfering nemo settings archinstall.storage['installation_session'].arch_chroot("gsettings set org.nemo.desktop show-desktop-icons false") archinstall.storage['installation_session'].arch_chroot("xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search") diff --git a/profiles/budgie.py b/profiles/budgie.py index dbbd3a9d..abaf87b0 100644 --- a/profiles/budgie.py +++ b/profiles/budgie.py @@ -4,9 +4,10 @@ import archinstall is_top_level_profile = False -# "It is recommended also to install the gnome group, which contains applications required for the standard GNOME experience." - Arch Wiki +# "It is recommended also to install the gnome group, which contains applications required for the standard GNOME experience." - Arch Wiki __packages__ = ["budgie-desktop", "lightdm", "lightdm-gtk-greeter", "gnome"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -23,6 +24,7 @@ def _prep_function(*args, **kwargs): 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("budgie", "/somewhere/budgie.py") # or through conventional import budgie @@ -33,4 +35,4 @@ if __name__ == 'budgie': # Install the Budgie packages archinstall.storage['installation_session'].add_additional_packages(__packages__) - archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager + archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager diff --git a/profiles/cinnamon.py b/profiles/cinnamon.py index 89798671..0122677a 100644 --- a/profiles/cinnamon.py +++ b/profiles/cinnamon.py @@ -4,7 +4,17 @@ import archinstall is_top_level_profile = False -__packages__ = ["cinnamon", "system-config-printer", "gnome-keyring", "gnome-terminal", "blueberry", "metacity", "lightdm", "lightdm-gtk-greeter"] +__packages__ = [ + "cinnamon", + "system-config-printer", + "gnome-keyring", + "gnome-terminal", + "blueberry", + "metacity", + "lightdm", + "lightdm-gtk-greeter", +] + def _prep_function(*args, **kwargs): """ @@ -22,6 +32,7 @@ def _prep_function(*args, **kwargs): 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("cinnamon", "/somewhere/cinnamon.py") # or through conventional import cinnamon @@ -32,4 +43,4 @@ if __name__ == 'cinnamon': # Install the Cinnamon packages archinstall.storage['installation_session'].add_additional_packages(__packages__) - archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager + archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager diff --git a/profiles/deepin.py b/profiles/deepin.py index 757597f3..a4778b0d 100644 --- a/profiles/deepin.py +++ b/profiles/deepin.py @@ -6,6 +6,7 @@ is_top_level_profile = False __packages__ = ["deepin", "deepin-terminal", "deepin-editor", "lightdm", "lightdm-gtk-greeter"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer diff --git a/profiles/desktop.py b/profiles/desktop.py index 9e1d8b4c..84c1ac06 100644 --- a/profiles/desktop.py +++ b/profiles/desktop.py @@ -6,7 +6,19 @@ 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'] +__packages__ = [ + 'nano', + 'vim', + 'openssh', + 'htop', + 'wget', + 'iwd', + 'wireless_tools', + 'wpa_supplicant', + 'smartmontools', + 'xdg-utils', +] + def _prep_function(*args, **kwargs): """ @@ -16,11 +28,25 @@ 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', 'mate', 'deepin', 'enlightenment'] + supported_desktops = [ + 'gnome', + 'kde', + 'awesome', + 'sway', + 'cinnamon', + 'xfce4', + 'lxqt', + 'i3', + 'budgie', + 'mate', + 'deepin', + 'enlightenment', + ] + + desktop = archinstall.generic_select( + supported_desktops, 'Select your desired desktop environment: ', allow_empty_input=False, sort=True + ) - desktop = archinstall.generic_select(supported_desktops, 'Select your desired desktop environment: ', - allow_empty_input=False, sort=True) - # Temporarily store the selected desktop profile # in a session-safe location, since this module will get reloaded # the next time it gets executed. @@ -34,6 +60,7 @@ def _prep_function(*args, **kwargs): else: print(f"Deprecated (??): {desktop} profile has no _prep_function() anymore") + if __name__ == 'desktop': """ This "profile" is a meta-profile. @@ -47,9 +74,8 @@ 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 archinstall.storage['installation_session'].add_additional_packages(__packages__) - - archinstall.storage['installation_session'].install_profile(archinstall.storage['_desktop_profile']) + archinstall.storage['installation_session'].install_profile(archinstall.storage['_desktop_profile']) diff --git a/profiles/enlightenment.py b/profiles/enlightenment.py index 6ff334de..4c5a7999 100644 --- a/profiles/enlightenment.py +++ b/profiles/enlightenment.py @@ -6,6 +6,7 @@ is_top_level_profile = False __packages__ = ["enlightenment", "terminology", "lightdm", "lightdm-gtk-greeter"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer diff --git a/profiles/gnome.py b/profiles/gnome.py index e6cc75c0..09fac1bb 100644 --- a/profiles/gnome.py +++ b/profiles/gnome.py @@ -7,6 +7,7 @@ is_top_level_profile = False # Note: GDM should be part of the gnome group, but adding it here for clarity __packages__ = ["gnome", "gnome-tweaks", "gdm"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -24,6 +25,7 @@ def _prep_function(*args, **kwargs): 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("gnome", "/somewhere/gnome.py") # or through conventional import gnome @@ -34,6 +36,6 @@ if __name__ == 'gnome': # Install the GNOME packages archinstall.storage['installation_session'].add_additional_packages(__packages__) - archinstall.storage['installation_session'].enable_service('gdm') # Gnome Display Manager + archinstall.storage['installation_session'].enable_service('gdm') # Gnome Display Manager # We could also start it via xinitrc since we do have Xorg, # but for gnome that's deprecated and wayland is preferred. diff --git a/profiles/i3.py b/profiles/i3.py index e99bc549..1972ba59 100644 --- a/profiles/i3.py +++ b/profiles/i3.py @@ -8,6 +8,7 @@ is_top_level_profile = False # of the profile to get a list of "what packages will be installed". __packages__ = ['i3lock', 'i3status', 'i3blocks', 'xterm', 'lightdm-gtk-greeter', 'lightdm', 'dmenu'] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -17,8 +18,9 @@ def _prep_function(*args, **kwargs): """ supported_configurations = ['i3-wm', 'i3-gaps'] - desktop = archinstall.generic_select(supported_configurations, 'Select your desired configuration: ', - allow_empty_input=False, sort=True) + desktop = archinstall.generic_select( + supported_configurations, 'Select your desired configuration: ', allow_empty_input=False, sort=True + ) # Temporarily store the selected desktop profile # in a session-safe location, since this module will get reloaded @@ -33,6 +35,7 @@ def _prep_function(*args, **kwargs): else: print('Deprecated (??): xorg profile has no _prep_function() anymore') + if __name__ == 'i3': """ This "profile" is a meta-profile. @@ -46,7 +49,7 @@ if __name__ == 'i3': 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 archinstall.storage['installation_session'].add_additional_packages(__packages__[:4]) diff --git a/profiles/kde.py b/profiles/kde.py index aac5ade4..66625074 100644 --- a/profiles/kde.py +++ b/profiles/kde.py @@ -8,6 +8,7 @@ __packages__ = ["plasma-meta", "konsole", "kate", "dolphin", "sddm", "plasma-way # TODO: Remove hard dependency of bash (due to .bash_profile) + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -24,6 +25,7 @@ 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: diff --git a/profiles/lxqt.py b/profiles/lxqt.py index 025d033d..af6337e6 100644 --- a/profiles/lxqt.py +++ b/profiles/lxqt.py @@ -1,4 +1,3 @@ - # A desktop environment using "LXQt" import archinstall @@ -7,6 +6,7 @@ is_top_level_profile = False __packages__ = ["lxqt", "breeze-icons", "oxygen-icons", "xdg-utils", "ttf-freefont", "leafpad", "slock", "sddm"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -23,6 +23,7 @@ def _prep_function(*args, **kwargs): 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 @@ -33,4 +34,4 @@ if __name__ == 'lxqt': # Install the LXQt packages archinstall.storage['installation_session'].add_additional_packages(__packages__) - archinstall.storage['installation_session'].enable_service('sddm') # SDDM Display Manager + archinstall.storage['installation_session'].enable_service('sddm') # SDDM Display Manager diff --git a/profiles/mate.py b/profiles/mate.py index e2421ed8..351f2250 100644 --- a/profiles/mate.py +++ b/profiles/mate.py @@ -6,6 +6,7 @@ is_top_level_profile = False __packages__ = ["mate", "mate-extra", "lightdm", "lightdm-gtk-greeter"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -22,6 +23,7 @@ def _prep_function(*args, **kwargs): 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 @@ -32,4 +34,4 @@ if __name__ == 'mate': # Install the MATE packages archinstall.storage['installation_session'].add_additional_packages(__packages__) - archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager + archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager diff --git a/profiles/minimal.py b/profiles/minimal.py index 79821a89..8af06a3a 100644 --- a/profiles/minimal.py +++ b/profiles/minimal.py @@ -4,6 +4,7 @@ import archinstall, os is_top_level_profile = True + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -11,7 +12,8 @@ def _prep_function(*args, **kwargs): 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 + return True # Do nothing and just return True + if __name__ == 'minimal': """ diff --git a/profiles/server.py b/profiles/server.py index d0346ace..36bfd3ab 100644 --- a/profiles/server.py +++ b/profiles/server.py @@ -6,6 +6,7 @@ is_top_level_profile = True available_servers = ["cockpit", "docker", "httpd", "lighttpd", "mariadb", "nginx", "postgresql", "sshd", "tomcat"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -13,9 +14,10 @@ def _prep_function(*args, **kwargs): """ selected_servers = archinstall.generic_multi_select(available_servers, f"Choose which servers to install and enable (leave blank for a minimal installation): ") archinstall.storage['_selected_servers'] = selected_servers - + return True + if __name__ == 'server': """ This "profile" is a meta-profile. diff --git a/profiles/sway.py b/profiles/sway.py index e90e5e8d..686fe868 100644 --- a/profiles/sway.py +++ b/profiles/sway.py @@ -39,9 +39,7 @@ if __name__ == "sway": "The proprietary Nvidia driver is not supported by Sway. It is likely that you will run into issues. Continue anyways? [y/N] " ) if choice.lower() in ("n", ""): - raise archinstall.lib.exceptions.HardwareIncompatibilityError( - "Sway does not support the proprietary nvidia drivers." - ) + raise archinstall.lib.exceptions.HardwareIncompatibilityError("Sway does not support the proprietary nvidia drivers.") # Install the Sway packages archinstall.storage['installation_session'].add_additional_packages(__packages__) diff --git a/profiles/xfce4.py b/profiles/xfce4.py index 43da23ac..ad00c461 100644 --- a/profiles/xfce4.py +++ b/profiles/xfce4.py @@ -1,4 +1,3 @@ - # A desktop environment using "Xfce4" import archinstall @@ -7,6 +6,7 @@ is_top_level_profile = False __packages__ = ["xfce4", "xfce4-goodies", "lightdm", "lightdm-gtk-greeter"] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer @@ -23,6 +23,7 @@ def _prep_function(*args, **kwargs): 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("xfce4", "/somewhere/xfce4.py") # or through conventional import xfce4 @@ -33,4 +34,4 @@ if __name__ == 'xfce4': # Install the XFCE4 packages archinstall.storage['installation_session'].add_additional_packages(__packages__) - archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager + archinstall.storage['installation_session'].enable_service('lightdm') # Light Display Manager diff --git a/profiles/xorg.py b/profiles/xorg.py index 19ca92d7..e7cf00d0 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -7,6 +7,7 @@ is_top_level_profile = True __packages__ = ['dkms', 'xorg-server', 'xorg-xinit', 'nvidia-dkms', 'xorg-server', *archinstall.lib.hardware.__packages__] + def _prep_function(*args, **kwargs): """ Magic function called by the importing installer -- cgit v1.2.3-70-g09d2 From acb754ff2edee96d3dc0c6ca29abd0c60a1a5ace Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 11:42:32 -0400 Subject: Try to remove some unused imports --- profiles/deepin.py | 2 +- profiles/desktop.py | 2 +- profiles/i3.py | 2 +- profiles/kde.py | 2 +- profiles/minimal.py | 2 -- profiles/server.py | 2 +- profiles/xorg.py | 1 - 7 files changed, 5 insertions(+), 8 deletions(-) (limited to 'profiles/xorg.py') diff --git a/profiles/deepin.py b/profiles/deepin.py index a4778b0d..ebe730e2 100644 --- a/profiles/deepin.py +++ b/profiles/deepin.py @@ -1,6 +1,6 @@ # A desktop environment using "Deepin". -import archinstall, os +import archinstall is_top_level_profile = False diff --git a/profiles/desktop.py b/profiles/desktop.py index 84c1ac06..67514a97 100644 --- a/profiles/desktop.py +++ b/profiles/desktop.py @@ -1,6 +1,6 @@ # A desktop environment selector. -import archinstall, os +import archinstall is_top_level_profile = True diff --git a/profiles/i3.py b/profiles/i3.py index 1972ba59..418749c0 100644 --- a/profiles/i3.py +++ b/profiles/i3.py @@ -1,6 +1,6 @@ # Common package for i3, lets user select which i3 configuration they want. -import archinstall, os +import archinstall is_top_level_profile = False diff --git a/profiles/kde.py b/profiles/kde.py index 66625074..cdb6a41a 100644 --- a/profiles/kde.py +++ b/profiles/kde.py @@ -1,6 +1,6 @@ # A desktop environment using "KDE". -import archinstall, os +import archinstall is_top_level_profile = False diff --git a/profiles/minimal.py b/profiles/minimal.py index 8af06a3a..13cfd05a 100644 --- a/profiles/minimal.py +++ b/profiles/minimal.py @@ -1,7 +1,5 @@ # Used to do a minimal install -import archinstall, os - is_top_level_profile = True diff --git a/profiles/server.py b/profiles/server.py index 36bfd3ab..ff7b2179 100644 --- a/profiles/server.py +++ b/profiles/server.py @@ -1,6 +1,6 @@ # Used to select various server application profiles on top of a minimal installation. -import archinstall, os, logging +import archinstall, logging is_top_level_profile = True diff --git a/profiles/xorg.py b/profiles/xorg.py index e7cf00d0..34599468 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -1,6 +1,5 @@ # A system with "xorg" installed -import os import archinstall is_top_level_profile = True -- cgit v1.2.3-70-g09d2 From d93ef24e8e080ab4c71366bfba0340d16f17524b Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 11:51:06 -0400 Subject: A couple more small fixes --- profiles/enlightenment.py | 2 +- profiles/server.py | 3 ++- profiles/xorg.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'profiles/xorg.py') diff --git a/profiles/enlightenment.py b/profiles/enlightenment.py index 4c5a7999..cfb97836 100644 --- a/profiles/enlightenment.py +++ b/profiles/enlightenment.py @@ -1,6 +1,6 @@ # A desktop environment using "Enlightenment". -import archinstall, os +import archinstall is_top_level_profile = False diff --git a/profiles/server.py b/profiles/server.py index ff7b2179..3ccc9715 100644 --- a/profiles/server.py +++ b/profiles/server.py @@ -1,6 +1,7 @@ # Used to select various server application profiles on top of a minimal installation. -import archinstall, logging +import archinstall +import logging is_top_level_profile = True diff --git a/profiles/xorg.py b/profiles/xorg.py index 34599468..a5a50697 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -36,4 +36,4 @@ if __name__ == 'xorg': else: archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") except: - archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install \ No newline at end of file + archinstall.storage['installation_session'].add_additional_packages("xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install \ No newline at end of file -- cgit v1.2.3-70-g09d2 From e111dd9bc1ac1c27efa14f89a2cb1464f135c0da Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 13:04:18 -0400 Subject: Final whitespace changes I think --- examples/unattended.py | 3 ++- profiles/52-54-00-12-34-56.py | 1 + profiles/kde.py | 1 + profiles/server.py | 3 ++- profiles/xorg.py | 1 + setup.py | 3 ++- 6 files changed, 9 insertions(+), 3 deletions(-) (limited to 'profiles/xorg.py') diff --git a/examples/unattended.py b/examples/unattended.py index bb854a70..f1ed4c94 100644 --- a/examples/unattended.py +++ b/examples/unattended.py @@ -1,6 +1,7 @@ -import archinstall import time +import archinstall + archinstall.storage['UPSTREAM_URL'] = 'https://archlinux.life/profiles' archinstall.storage['PROFILE_DB'] = 'index.json' diff --git a/profiles/52-54-00-12-34-56.py b/profiles/52-54-00-12-34-56.py index 758a4cc2..e1361073 100644 --- a/profiles/52-54-00-12-34-56.py +++ b/profiles/52-54-00-12-34-56.py @@ -1,4 +1,5 @@ import archinstall + # import json # import urllib.request diff --git a/profiles/kde.py b/profiles/kde.py index cdb6a41a..451704b9 100644 --- a/profiles/kde.py +++ b/profiles/kde.py @@ -6,6 +6,7 @@ is_top_level_profile = False __packages__ = ["plasma-meta", "konsole", "kate", "dolphin", "sddm", "plasma-wayland-session", "egl-wayland"] + # TODO: Remove hard dependency of bash (due to .bash_profile) diff --git a/profiles/server.py b/profiles/server.py index 3ccc9715..afc37776 100644 --- a/profiles/server.py +++ b/profiles/server.py @@ -1,8 +1,9 @@ # Used to select various server application profiles on top of a minimal installation. -import archinstall import logging +import archinstall + is_top_level_profile = True available_servers = ["cockpit", "docker", "httpd", "lighttpd", "mariadb", "nginx", "postgresql", "sshd", "tomcat"] diff --git a/profiles/xorg.py b/profiles/xorg.py index a5a50697..3351e4e5 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -22,6 +22,7 @@ def _prep_function(*args, **kwargs): return True + # Ensures that this code only gets executed if executed # through importlib.util.spec_from_file_location("xorg", "/somewhere/xorg.py") # or through conventional import xorg diff --git a/setup.py b/setup.py index 8b95d978..68a125d1 100644 --- a/setup.py +++ b/setup.py @@ -1,2 +1,3 @@ -import setuptools # type: ignore +import setuptools # type: ignore + setuptools.setup() -- cgit v1.2.3-70-g09d2 From 3b20adb7d216cbe72bf1770e219207216bee96ee Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 13:59:37 -0400 Subject: Whitespace changes --- archinstall/lib/disk.py | 16 ++++++++++------ archinstall/lib/general.py | 2 ++ archinstall/lib/hardware.py | 2 +- archinstall/lib/installer.py | 5 ++--- archinstall/lib/mirrors.py | 2 +- archinstall/lib/profiles.py | 6 +++--- archinstall/lib/services.py | 2 +- docs/pull_request_template.md | 3 +-- examples/guided.py | 12 ++++++------ profiles/gnome.py | 4 ++-- profiles/xorg.py | 4 ++-- 11 files changed, 31 insertions(+), 27 deletions(-) (limited to 'profiles/xorg.py') diff --git a/archinstall/lib/disk.py b/archinstall/lib/disk.py index 2241ac8e..62f1785f 100644 --- a/archinstall/lib/disk.py +++ b/archinstall/lib/disk.py @@ -152,8 +152,9 @@ class BlockDevice(): def flush_cache(self): self.part_cache = OrderedDict() + class Partition(): - def __init__(self, path :str, block_device :BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True): + def __init__(self, path: str, block_device: BlockDevice, part_id=None, size=-1, filesystem=None, mountpoint=None, encrypted=False, autodetect_filesystem=True): if not part_id: part_id = os.path.basename(path) @@ -506,9 +507,9 @@ class Filesystem(): self.blockdevice.partition[0].allow_formatting = True self.blockdevice.partition[1].allow_formatting = True else: - #we don't need a seprate boot partition it would be a waste of space + # we don't need a seprate boot partition it would be a waste of space self.add_partition('primary', start='1MB', end='100%') - self.blockdevice.partition[0].filesystem=root_filesystem_type + self.blockdevice.partition[0].filesystem = root_filesystem_type log(f"Set the root partition {self.blockdevice.partition[0]} to use filesystem {root_filesystem_type}.", level=logging.DEBUG) self.blockdevice.partition[0].target_mountpoint = '/' self.blockdevice.partition[0].allow_formatting = True @@ -558,28 +559,31 @@ def device_state(name, *args, **kwargs): return return True + # lsblk --json -l -n -o path def all_disks(*args, **kwargs): kwargs.setdefault("partitions", False) drives = OrderedDict() - #for drive in json.loads(sys_command(f'losetup --json', *args, **lkwargs, hide_from_log=True)).decode('UTF_8')['loopdevices']: + # for drive in json.loads(sys_command(f'losetup --json', *args, **lkwargs, hide_from_log=True)).decode('UTF_8')['loopdevices']: for drive in json.loads(b''.join(sys_command(f'lsblk --json -l -n -o path,size,type,mountpoint,label,pkname,model', *args, **kwargs, hide_from_log=True)).decode('UTF_8'))['blockdevices']: if not kwargs['partitions'] and drive['type'] == 'part': continue drives[drive['path']] = BlockDevice(drive['path'], drive) return drives + def convert_to_gigabytes(string): unit = string.strip()[-1] size = float(string.strip()[:-1]) if unit == 'M': - size = size/1024 + size = size / 1024 elif unit == 'T': - size = size*1024 + size = size * 1024 return size + def harddrive(size=None, model=None, fuzzy=False): collection = all_disks() for drive in collection: diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py index 9f6de666..f9b9078a 100644 --- a/archinstall/lib/general.py +++ b/archinstall/lib/general.py @@ -83,10 +83,12 @@ class JSON(json.JSONEncoder, json.JSONDecoder): def encode(self, obj): return super(JSON, self).encode(self._encode(obj)) + class sys_command: """ Stolen from archinstall_gui """ + def __init__(self, cmd, callback=None, start_callback=None, peak_output=False, environment_vars={}, *args, **kwargs): kwargs.setdefault("worker_id", gen_uid()) kwargs.setdefault("emulate", False) diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 9eaff22e..3203daee 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -108,7 +108,7 @@ def cpuVendor() -> Optional[str]: def isVM() -> bool: try: - subprocess.check_call(["systemd-detect-virt"]) # systemd-detect-virt issues a non-zero exit code if it is not on a virtual machine + subprocess.check_call(["systemd-detect-virt"]) # systemd-detect-virt issues a non-zero exit code if it is not on a virtual machine return True except: return False diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index eccd2c49..cacdff69 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -153,7 +153,7 @@ class Installer(): return True - def set_hostname(self, hostname :str, *args, **kwargs): + def set_hostname(self, hostname: str, *args, **kwargs): with open(f'{self.target}/etc/hostname', 'w') as fh: fh.write(hostname + '\n') @@ -423,7 +423,6 @@ class Installer(): ## blkid doesn't trigger on loopback devices really well, ## so we'll use the old manual method until we get that sorted out. - if (real_device := self.detect_encryption(root_partition)): # TODO: We need to detect if the encrypted device is a whole disk encryption, # or simply a partition encryption. Right now we assume it's a partition (and we always have) @@ -446,7 +445,7 @@ class Installer(): sys_command('/usr/bin/arch-chroot /mnt grub-mkconfig -o /boot/grub/grub.cfg') return True else: - root_device = subprocess.check_output(f'basename "$(readlink -f /sys/class/block/{root_partition.path.replace("/dev/","")}/..)"', shell=True).decode().strip() + root_device = subprocess.check_output(f'basename "$(readlink -f /sys/class/block/{root_partition.path.replace("/dev/", "")}/..)"', shell=True).decode().strip() if root_device == "block": root_device = f"{root_partition.path}" o = b''.join(sys_command(f'/usr/bin/arch-chroot {self.target} grub-install --target=i386-pc /dev/{root_device}')) diff --git a/archinstall/lib/mirrors.py b/archinstall/lib/mirrors.py index e53b356a..4b05b96a 100644 --- a/archinstall/lib/mirrors.py +++ b/archinstall/lib/mirrors.py @@ -22,7 +22,7 @@ def filter_mirrors_by_region(regions, destination='/etc/pacman.d/mirrorlist', tm return True -def add_custom_mirrors(mirrors:list, *args, **kwargs): +def add_custom_mirrors(mirrors: list, *args, **kwargs): """ This will append custom mirror definitions in pacman.conf diff --git a/archinstall/lib/profiles.py b/archinstall/lib/profiles.py index 8b5525b4..2f97231c 100644 --- a/archinstall/lib/profiles.py +++ b/archinstall/lib/profiles.py @@ -14,7 +14,7 @@ from .storage import storage def grab_url_data(path): - safe_path = path[:path.find(':')+1]+''.join([item if item in ('/', '?', '=', '&') else urllib.parse.quote(item) for item in multisplit(path[path.find(':')+1:], ('/', '?', '=', '&'))]) + safe_path = path[:path.find(':') + 1] + ''.join([item if item in ('/', '?', '=', '&') else urllib.parse.quote(item) for item in multisplit(path[path.find(':') + 1:], ('/', '?', '=', '&'))]) ssl_context = ssl.create_default_context() ssl_context.check_hostname = False ssl_context.verify_mode = ssl.CERT_NONE @@ -47,7 +47,7 @@ def list_profiles(filter_irrelevant_macs=True, subpath='', filter_top_level_prof if len(first_line) and first_line[0] == '#': description = first_line[1:].strip() - cache[file[:-3]] = {'path' : os.path.join(root, file), 'description' : description, 'tailored' : tailored} + cache[file[:-3]] = {'path': os.path.join(root, file), 'description': description, 'tailored': tailored} break # Grab profiles from upstream URL @@ -70,7 +70,7 @@ def list_profiles(filter_irrelevant_macs=True, subpath='', filter_top_level_prof continue tailored = True - cache[profile[:-3]] = {'path' : os.path.join(storage["UPSTREAM_URL"]+subpath, profile), 'description' : profile_list[profile], 'tailored' : tailored} + cache[profile[:-3]] = {'path': os.path.join(storage["UPSTREAM_URL"] + subpath, profile), 'description': profile_list[profile], 'tailored': tailored} if filter_top_level_profiles: for profile in list(cache.keys()): diff --git a/archinstall/lib/services.py b/archinstall/lib/services.py index 46aa7846..537a2f84 100644 --- a/archinstall/lib/services.py +++ b/archinstall/lib/services.py @@ -5,6 +5,6 @@ def service_state(service_name: str): if os.path.splitext(service_name)[1] != '.service': service_name += '.service' # Just to be safe - state = b''.join(sys_command(f'systemctl show --no-pager -p SubState --value {service_name}', environment_vars={'SYSTEMD_COLORS' : '0'})) + state = b''.join(sys_command(f'systemctl show --no-pager -p SubState --value {service_name}', environment_vars={'SYSTEMD_COLORS': '0'})) return state.strip().decode('UTF-8') diff --git a/docs/pull_request_template.md b/docs/pull_request_template.md index 18d01ab2..1cbcf76a 100644 --- a/docs/pull_request_template.md +++ b/docs/pull_request_template.md @@ -12,5 +12,4 @@ If the PR is larger than ~20 lines, please describe it here unless described in # Testing -Any new feature or stability improvement should be tested if possible. Please follow the test instructions at the bottom -of the README or use the ISO built on each PR. +Any new feature or stability improvement should be tested if possible. Please follow the test instructions at the bottom of the README or use the ISO built on each PR. diff --git a/examples/guided.py b/examples/guided.py index ae5c5f54..ca50f838 100644 --- a/examples/guided.py +++ b/examples/guided.py @@ -85,7 +85,7 @@ def ask_user_questions(): # If we provide keys as options, it's better to convert them to list and sort before passing mountpoints_list = sorted(list(partition_mountpoints.keys())) partition = archinstall.generic_select(mountpoints_list, - "Select a partition by number that you want to set a mount-point for (leave blank when done): ") + "Select a partition by number that you want to set a mount-point for (leave blank when done): ") if not partition: if set(mountpoints_set) & {'/', '/boot'} == {'/', '/boot'}: break @@ -316,12 +316,12 @@ def perform_installation(mountpoint): time.sleep(1) # Set mirrors used by pacstrap (outside of installation) if archinstall.arguments.get('mirror-region', None): - archinstall.use_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors for the live medium + archinstall.use_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors for the live medium if installation.minimal_installation(): installation.set_hostname(archinstall.arguments['hostname']) if archinstall.arguments['mirror-region'].get("mirrors", None) is not None: - installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium - if archinstall.arguments["bootloader"]=="grub-install" and hasUEFI()==True: + installation.set_mirrors(archinstall.arguments['mirror-region']) # Set the mirrors in the installation medium + if archinstall.arguments["bootloader"] == "grub-install" and hasUEFI() == True: installation.add_additional_packages("grub") installation.set_keyboard_language(archinstall.arguments['keyboard-language']) installation.add_bootloader(archinstall.arguments["bootloader"]) @@ -329,8 +329,8 @@ def perform_installation(mountpoint): # If user selected to copy the current ISO network configuration # Perform a copy of the config if archinstall.arguments.get('nic', {}) == 'Copy ISO network configuration to installation': - installation.copy_ISO_network_config(enable_services=True) # Sources the ISO network configuration to the install medium. - elif archinstall.arguments.get('nic', {}).get('NetworkManager',False): + installation.copy_ISO_network_config(enable_services=True) # Sources the ISO network configuration to the install medium. + elif archinstall.arguments.get('nic', {}).get('NetworkManager', False): installation.add_additional_packages("networkmanager") installation.enable_service('NetworkManager.service') # Otherwise, if a interface was selected, configure that interface diff --git a/profiles/gnome.py b/profiles/gnome.py index 09fac1bb..7bf5b7fd 100644 --- a/profiles/gnome.py +++ b/profiles/gnome.py @@ -37,5 +37,5 @@ if __name__ == 'gnome': archinstall.storage['installation_session'].add_additional_packages(__packages__) archinstall.storage['installation_session'].enable_service('gdm') # Gnome Display Manager - # We could also start it via xinitrc since we do have Xorg, - # but for gnome that's deprecated and wayland is preferred. +# We could also start it via xinitrc since we do have Xorg, +# but for gnome that's deprecated and wayland is preferred. diff --git a/profiles/xorg.py b/profiles/xorg.py index 3351e4e5..e18a4f03 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -30,11 +30,11 @@ if __name__ == 'xorg': try: if "nvidia" in _gfx_driver_packages: if "linux-zen" in archinstall.storage['installation_session'].base_packages or "linux-lts" in archinstall.storage['installation_session'].base_packages: - archinstall.storage['installation_session'].add_additional_packages("dkms")#I've had kernel regen fail if it wasn't installed before nvidia-dkms + archinstall.storage['installation_session'].add_additional_packages("dkms") # I've had kernel regen fail if it wasn't installed before nvidia-dkms archinstall.storage['installation_session'].add_additional_packages("xorg-server xorg-xinit nvidia-dkms") else: archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") else: archinstall.storage['installation_session'].add_additional_packages(f"xorg-server xorg-xinit {' '.join(_gfx_driver_packages)}") except: - archinstall.storage['installation_session'].add_additional_packages("xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install \ No newline at end of file + archinstall.storage['installation_session'].add_additional_packages("xorg-server xorg-xinit") # Prep didn't run, so there's no driver to install -- cgit v1.2.3-70-g09d2 From 3ee38afce1d8f3680245293f8f97353054afd52a Mon Sep 17 00:00:00 2001 From: Dylan Taylor Date: Sat, 15 May 2021 17:28:27 -0400 Subject: One package per line formatting in profiles - easier to read/maintain --- profiles/applications/awesome.py | 12 +++++++++++- profiles/awesome.py | 7 ++++++- profiles/budgie.py | 7 ++++++- profiles/deepin.py | 8 +++++++- profiles/enlightenment.py | 7 ++++++- profiles/gnome.py | 6 +++++- profiles/i3.py | 10 +++++++++- profiles/kde.py | 10 +++++++++- profiles/lxqt.py | 11 ++++++++++- profiles/server.py | 12 +++++++++++- profiles/xorg.py | 9 ++++++++- 11 files changed, 88 insertions(+), 11 deletions(-) (limited to 'profiles/xorg.py') diff --git a/profiles/applications/awesome.py b/profiles/applications/awesome.py index d5a8e793..33526fd7 100644 --- a/profiles/applications/awesome.py +++ b/profiles/applications/awesome.py @@ -1,6 +1,16 @@ import archinstall -__packages__ = ["awesome", "xorg-xrandr", "xterm", "feh", "slock", "terminus-font", "gnu-free-fonts", "ttf-liberation", "xsel"] +__packages__ = [ + "awesome", + "xorg-xrandr", + "xterm", + "feh", + "slock", + "terminus-font", + "gnu-free-fonts", + "ttf-liberation", + "xsel", +] archinstall.storage['installation_session'].install_profile('xorg') diff --git a/profiles/awesome.py b/profiles/awesome.py index aa4702a6..0c1b20ea 100644 --- a/profiles/awesome.py +++ b/profiles/awesome.py @@ -6,7 +6,12 @@ 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__ = ['nemo', 'gpicview', 'main', 'alacritty'] +__packages__ = [ + "nemo", + "gpicview", + "main", + "alacritty", +] def _prep_function(*args, **kwargs): diff --git a/profiles/budgie.py b/profiles/budgie.py index abaf87b0..3e4a85df 100644 --- a/profiles/budgie.py +++ b/profiles/budgie.py @@ -5,7 +5,12 @@ import archinstall is_top_level_profile = False # "It is recommended also to install the gnome group, which contains applications required for the standard GNOME experience." - Arch Wiki -__packages__ = ["budgie-desktop", "lightdm", "lightdm-gtk-greeter", "gnome"] +__packages__ = [ + "budgie-desktop", + "gnome", + "lightdm", + "lightdm-gtk-greeter", +] def _prep_function(*args, **kwargs): diff --git a/profiles/deepin.py b/profiles/deepin.py index ebe730e2..5bc18285 100644 --- a/profiles/deepin.py +++ b/profiles/deepin.py @@ -4,7 +4,13 @@ import archinstall is_top_level_profile = False -__packages__ = ["deepin", "deepin-terminal", "deepin-editor", "lightdm", "lightdm-gtk-greeter"] +__packages__ = [ + "deepin", + "deepin-terminal", + "deepin-editor", + "lightdm", + "lightdm-gtk-greeter", +] def _prep_function(*args, **kwargs): diff --git a/profiles/enlightenment.py b/profiles/enlightenment.py index cfb97836..3850fed0 100644 --- a/profiles/enlightenment.py +++ b/profiles/enlightenment.py @@ -4,7 +4,12 @@ import archinstall is_top_level_profile = False -__packages__ = ["enlightenment", "terminology", "lightdm", "lightdm-gtk-greeter"] +__packages__ = [ + "enlightenment", + "terminology", + "lightdm", + "lightdm-gtk-greeter", +] def _prep_function(*args, **kwargs): diff --git a/profiles/gnome.py b/profiles/gnome.py index 7bf5b7fd..1b3bf327 100644 --- a/profiles/gnome.py +++ b/profiles/gnome.py @@ -5,7 +5,11 @@ import archinstall is_top_level_profile = False # Note: GDM should be part of the gnome group, but adding it here for clarity -__packages__ = ["gnome", "gnome-tweaks", "gdm"] +__packages__ = [ + "gnome", + "gnome-tweaks", + "gdm", +] def _prep_function(*args, **kwargs): diff --git a/profiles/i3.py b/profiles/i3.py index c25003f9..b26745a1 100644 --- a/profiles/i3.py +++ b/profiles/i3.py @@ -6,7 +6,15 @@ 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', 'lightdm-gtk-greeter', 'lightdm', 'dmenu'] +__packages__ = [ + 'i3lock', + 'i3status', + 'i3blocks', + 'xterm', + 'lightdm-gtk-greeter', + 'lightdm', + 'dmenu', +] def _prep_function(*args, **kwargs): diff --git a/profiles/kde.py b/profiles/kde.py index 451704b9..c58f4f45 100644 --- a/profiles/kde.py +++ b/profiles/kde.py @@ -4,7 +4,15 @@ import archinstall is_top_level_profile = False -__packages__ = ["plasma-meta", "konsole", "kate", "dolphin", "sddm", "plasma-wayland-session", "egl-wayland"] +__packages__ = [ + "plasma-meta", + "konsole", + "kate", + "dolphin", + "sddm", + "plasma-wayland-session", + "egl-wayland", +] # TODO: Remove hard dependency of bash (due to .bash_profile) diff --git a/profiles/lxqt.py b/profiles/lxqt.py index af6337e6..a241353a 100644 --- a/profiles/lxqt.py +++ b/profiles/lxqt.py @@ -4,7 +4,16 @@ import archinstall is_top_level_profile = False -__packages__ = ["lxqt", "breeze-icons", "oxygen-icons", "xdg-utils", "ttf-freefont", "leafpad", "slock", "sddm"] +__packages__ = [ + "lxqt", + "breeze-icons", + "oxygen-icons", + "xdg-utils", + "ttf-freefont", + "leafpad", + "slock", + "sddm", +] def _prep_function(*args, **kwargs): diff --git a/profiles/server.py b/profiles/server.py index 355be9f5..704c8efe 100644 --- a/profiles/server.py +++ b/profiles/server.py @@ -6,7 +6,17 @@ import archinstall is_top_level_profile = True -available_servers = ["cockpit", "docker", "httpd", "lighttpd", "mariadb", "nginx", "postgresql", "sshd", "tomcat"] +available_servers = [ + "cockpit", + "docker", + "httpd", + "lighttpd", + "mariadb", + "nginx", + "postgresql", + "sshd", + "tomcat", +] def _prep_function(*args, **kwargs): diff --git a/profiles/xorg.py b/profiles/xorg.py index e18a4f03..b8fb2cbb 100644 --- a/profiles/xorg.py +++ b/profiles/xorg.py @@ -4,7 +4,14 @@ import archinstall is_top_level_profile = True -__packages__ = ['dkms', 'xorg-server', 'xorg-xinit', 'nvidia-dkms', 'xorg-server', *archinstall.lib.hardware.__packages__] +__packages__ = [ + 'dkms', + 'xorg-server', + 'xorg-xinit', + 'nvidia-dkms', + 'xorg-server', + *archinstall.lib.hardware.__packages__, +] def _prep_function(*args, **kwargs): -- cgit v1.2.3-70-g09d2