Add network-manager-applet to NetworkManager profile (#1120)
* Add network-manager-applet to NetworkManager profile * Converted _configuration.is_desktop_profile() into profile.is_desktop_profile Co-authored-by: Anton Hvornum <anton@hvornum.se>
This commit is contained in:
parent
960b48da5e
commit
8d4a62e504
|
|
@ -5,6 +5,7 @@ from enum import Enum
|
|||
from typing import List, Optional, Dict, Union, Any, TYPE_CHECKING
|
||||
|
||||
from ..output import log
|
||||
from ..storage import storage
|
||||
|
||||
if TYPE_CHECKING:
|
||||
_: Any
|
||||
|
|
@ -77,7 +78,9 @@ class NetworkConfigurationHandler:
|
|||
installation.copy_iso_network_config(
|
||||
enable_services=True) # Sources the ISO network configuration to the install medium.
|
||||
elif self._configuration.is_network_manager():
|
||||
installation.add_additional_packages("networkmanager")
|
||||
installation.add_additional_packages(["networkmanager"])
|
||||
if (profile := storage['arguments'].get('profile')) and profile.is_desktop_profile:
|
||||
installation.add_additional_packages(["network-manager-applet"])
|
||||
installation.enable_service('NetworkManager.service')
|
||||
|
||||
def _backwards_compability_config(self, config: Union[str,Dict[str, str]]) -> Union[List[NetworkConfiguration], NetworkConfiguration, None]:
|
||||
|
|
|
|||
|
|
@ -211,6 +211,10 @@ class Profile(Script):
|
|||
def name(self) -> str:
|
||||
return os.path.basename(self.profile)
|
||||
|
||||
@property
|
||||
def is_desktop_profile(self) -> bool:
|
||||
return is_desktop_profile(repr(self))
|
||||
|
||||
def install(self) -> ModuleType:
|
||||
# Before installing, revert any temporary changes to the namespace.
|
||||
# This ensures that the namespace during installation is the original initiation namespace.
|
||||
|
|
|
|||
Loading…
Reference in New Issue