From 2d06cf592a15e69911ffa82e7d86d832bf8ca89c Mon Sep 17 00:00:00 2001 From: Daniel Girtler Date: Thu, 4 May 2023 00:37:55 +1000 Subject: Fix 1772 (#1773) Co-authored-by: Daniel Girtler --- archinstall/lib/models/network_configuration.py | 13 +++++++++---- archinstall/lib/profile/__init__.py | 3 +++ 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'archinstall/lib') diff --git a/archinstall/lib/models/network_configuration.py b/archinstall/lib/models/network_configuration.py index 66230e24..a8795fc1 100644 --- a/archinstall/lib/models/network_configuration.py +++ b/archinstall/lib/models/network_configuration.py @@ -6,7 +6,7 @@ from enum import Enum from typing import List, Optional, Dict, Union, Any, TYPE_CHECKING, Tuple from ..output import log -from ..storage import storage +from ..profile import ProfileConfiguration if TYPE_CHECKING: _: Any @@ -103,7 +103,11 @@ class NetworkConfigurationHandler: def configuration(self): return self._configuration - def config_installer(self, installation: Any): + def config_installer( + self, + installation: Any, + profile_config: Optional[ProfileConfiguration] = None + ): if self._configuration is None: return @@ -122,8 +126,9 @@ class NetworkConfigurationHandler: ) elif self._configuration.is_network_manager(): installation.add_additional_packages(["networkmanager"]) - if (profile := storage['arguments'].get('profile_config')) and profile.is_desktop_type_profile: - installation.add_additional_packages(["network-manager-applet"]) + if profile_config and profile_config.profile: + if profile_config.profile.is_desktop_type_profile(): + installation.add_additional_packages(["network-manager-applet"]) installation.enable_service('NetworkManager.service') def _parse_manual_config(self, configs: List[Dict[str, Any]]) -> Optional[List[NetworkConfiguration]]: diff --git a/archinstall/lib/profile/__init__.py b/archinstall/lib/profile/__init__.py index e69de29b..6e74b0d8 100644 --- a/archinstall/lib/profile/__init__.py +++ b/archinstall/lib/profile/__init__.py @@ -0,0 +1,3 @@ +from .profile_menu import ProfileMenu, select_greeter, select_profile +from .profiles_handler import profile_handler +from .profile_model import ProfileConfiguration -- cgit v1.2.3-70-g09d2