diff --git a/archinstall/default_profiles/profile.py b/archinstall/default_profiles/profile.py index 1ae403527e..b787766b2e 100644 --- a/archinstall/default_profiles/profile.py +++ b/archinstall/default_profiles/profile.py @@ -22,7 +22,6 @@ class ProfileType(Enum): DesktopEnv = 'Desktop Environment' CustomType = 'CustomType' # special things - Tailored = 'Tailored' Application = 'Application' @@ -158,9 +157,6 @@ def is_desktop_type_profile(self) -> bool: def is_xorg_type_profile(self) -> bool: return self.profile_type == ProfileType.Xorg if self._advanced_check() else False - def is_tailored(self) -> bool: - return self.profile_type == ProfileType.Tailored - def is_custom_type_profile(self) -> bool: return self.profile_type == ProfileType.CustomType diff --git a/archinstall/default_profiles/tailored.py b/archinstall/default_profiles/tailored.py deleted file mode 100644 index 5076358145..0000000000 --- a/archinstall/default_profiles/tailored.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import TYPE_CHECKING, override - -from archinstall.default_profiles.profile import ProfileType -from archinstall.default_profiles.xorg import XorgProfile - -if TYPE_CHECKING: - from archinstall.lib.installer import Installer - - -class TailoredProfile(XorgProfile): - def __init__(self) -> None: - super().__init__('52-54-00-12-34-56', ProfileType.Tailored) - - @property - @override - def packages(self) -> list[str]: - return ['nano', 'wget', 'git'] - - @override - def install(self, install_session: 'Installer') -> None: - super().install(install_session) - # do whatever you like here :) diff --git a/archinstall/lib/profile/profiles_handler.py b/archinstall/lib/profile/profiles_handler.py index 2e795cc795..2874bc5eea 100644 --- a/archinstall/lib/profile/profiles_handler.py +++ b/archinstall/lib/profile/profiles_handler.py @@ -2,7 +2,6 @@ import inspect import sys from collections import Counter -from functools import cached_property from pathlib import Path from tempfile import NamedTemporaryFile from types import ModuleType @@ -13,7 +12,7 @@ from ...default_profiles.profile import GreeterType, Profile from ..hardware import GfxDriver from ..models.profile import ProfileConfiguration -from ..networking import fetch_data_from_url, list_interfaces +from ..networking import fetch_data_from_url from ..output import debug, error, info if TYPE_CHECKING: @@ -141,10 +140,6 @@ def profiles(self) -> list[Profile]: self._profiles = self._profiles or self._find_available_profiles() return self._profiles - @cached_property - def _local_mac_addresses(self) -> list[str]: - return list(list_interfaces()) - def add_custom_profiles(self, profiles: Profile | list[Profile]) -> None: if not isinstance(profiles, list): profiles = [profiles] @@ -176,10 +171,6 @@ def get_desktop_profiles(self) -> list[Profile]: def get_custom_profiles(self) -> list[Profile]: return [p for p in self.profiles if p.is_custom_type_profile()] - def get_mac_addr_profiles(self) -> list[Profile]: - tailored = [p for p in self.profiles if p.is_tailored()] - return [t for t in tailored if t.name in self._local_mac_addresses] - def install_greeter(self, install_session: 'Installer', greeter: GreeterType) -> None: packages = [] service = None diff --git a/examples/mac_address_installation.py b/examples/mac_address_installation.py deleted file mode 100644 index 1c2a3ecb54..0000000000 --- a/examples/mac_address_installation.py +++ /dev/null @@ -1,20 +0,0 @@ -import time - -from archinstall.lib.output import info -from archinstall.lib.profile.profiles_handler import profile_handler -from archinstall.lib.storage import storage -from archinstall.tui import Tui - -for _profile in profile_handler.get_mac_addr_profiles(): - # Tailored means it's a match for this machine - # based on its MAC address (or some other criteria - # that fits the requirements for this machine specifically). - info(f'Found a tailored profile for this machine called: "{_profile.name}"') - - print('Starting install in:') - for i in range(10, 0, -1): - Tui.print(f'{i}...') - time.sleep(1) - - install_session = storage['installation_session'] - _profile.install(install_session)