Move more logic into common profile

This commit is contained in:
Dylan Taylor 2021-04-08 21:08:17 -04:00
parent a5eb815b3e
commit 6a6439daa9
3 changed files with 11 additions and 13 deletions

View File

@ -31,13 +31,7 @@ def _post_install(*args, **kwargs):
return True
if __name__ == 'i3-wm':
# 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")
if __name__ == 'i3-gaps':
# install the i3 group now
i3 = archinstall.Application(installation, 'i3-gaps')
i3.install()
# Auto start lightdm for all users
installation.enable_service('lightdm')

View File

@ -17,6 +17,7 @@ def _prep_function(*args, **kwargs):
return imported._prep_function()
else:
print('Deprecated (??): xorg profile has no _prep_function() anymore')
def _post_install(*args, **kwargs):
"""
Another magic function called after the system
@ -31,12 +32,6 @@ def _post_install(*args, **kwargs):
return True
if __name__ == 'i3-wm':
# Install dependency profiles
installation.install_profile('xorg')
# we are installing lightdm to auto start i3
installation.add_additional_packages("lightdm-gtk-greeter lightdm")
# install the i3 group now
i3 = archinstall.Application(installation, 'i3-wm')
i3.install()
# Auto start lightdm for all users
installation.enable_service('lightdm')

View File

@ -49,6 +49,15 @@ if __name__ == 'i3':
# 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')
# TODO: Remove magic variable 'installation' and place it
# in archinstall.storage or archinstall.session/archinstall.installation
installation.install_profile(archinstall.storage['_desktop_profile'])