index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/profile/profile_model.py | 8 |
diff --git a/archinstall/lib/profile/profile_model.py b/archinstall/lib/profile/profile_model.py index ad3015ae..2b52073a 100644 --- a/archinstall/lib/profile/profile_model.py +++ b/archinstall/lib/profile/profile_model.py @@ -3,6 +3,7 @@ from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING, Any, Optional, Dict +from ..hardware import GfxDriver from archinstall.default_profiles.profile import Profile, GreeterType if TYPE_CHECKING: @@ -12,14 +13,14 @@ if TYPE_CHECKING: @dataclass class ProfileConfiguration: profile: Optional[Profile] = None - gfx_driver: Optional[str] = None + gfx_driver: Optional[GfxDriver] = None greeter: Optional[GreeterType] = None def json(self) -> Dict[str, Any]: from .profiles_handler import profile_handler return { 'profile': profile_handler.to_json(self.profile), - 'gfx_driver': self.gfx_driver, + 'gfx_driver': self.gfx_driver.value if self.gfx_driver else None, 'greeter': self.greeter.value if self.greeter else None } @@ -27,9 +28,10 @@ class ProfileConfiguration: def parse_arg(cls, arg: Dict[str, Any]) -> 'ProfileConfiguration': from .profiles_handler import profile_handler greeter = arg.get('greeter', None) + gfx_driver = arg.get('gfx_driver', None) return ProfileConfiguration( profile_handler.parse_profile_config(arg['profile']), - arg.get('gfx_driver', None), + GfxDriver(gfx_driver) if gfx_driver else None, GreeterType(greeter) if greeter else None ) |