Skip to content

Commit 82e2cba

Browse files
committed
Update
1 parent 47e48b3 commit 82e2cba

49 files changed

Lines changed: 760 additions & 180 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

archinstall/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ def plugin(f, *args, **kwargs) -> None: # type: ignore[no-untyped-def]
3131

3232
def _log_sys_info() -> None:
3333
# Log various information about hardware before starting the installation. This might assist in troubleshooting
34-
debug(f'Hardware model detected: {SysInfo.sys_vendor()} {SysInfo.product_name()}; UEFI mode: {SysInfo.has_uefi()}')
34+
debug(
35+
f'Hardware model detected: {SysInfo.sys_vendor()} {SysInfo.product_name()}; UEFI mode: {SysInfo.has_uefi()}',
36+
)
3537
debug(f'Processor model detected: {SysInfo.cpu_model()}')
36-
debug(f'Memory statistics: {SysInfo.mem_available()} available out of {SysInfo.mem_total()} total installed')
38+
debug(
39+
f'Memory statistics: {SysInfo.mem_available()} available out of {SysInfo.mem_total()} total installed',
40+
)
3741
debug(f'Virtualization detected: {SysInfo.virtualization()}; is VM: {SysInfo.is_vm()}')
3842
debug(f'Graphics devices detected: {SysInfo._graphics_devices().keys()}')
3943

archinstall/default_profiles/applications/pipewire.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,21 @@ def _enable_pipewire_for_all(self, install_session: 'Installer') -> None:
3434

3535
for user in users:
3636
# Create the full path for enabling the pipewire systemd items
37-
service_dir = install_session.target / 'home' / user.username / '.config' / 'systemd' / 'user' / 'default.target.wants'
37+
service_dir = (
38+
install_session.target
39+
/ 'home'
40+
/ user.username
41+
/ '.config'
42+
/ 'systemd'
43+
/ 'user'
44+
/ 'default.target.wants'
45+
)
3846
service_dir.mkdir(parents=True, exist_ok=True)
3947

4048
# Set ownership of the entire user catalogue
41-
install_session.arch_chroot(f'chown -R {user.username}:{user.username} /home/{user.username}')
49+
install_session.arch_chroot(
50+
f'chown -R {user.username}:{user.username} /home/{user.username}',
51+
)
4252

4353
# symlink in the correct pipewire systemd items
4454
install_session.arch_chroot(

archinstall/default_profiles/desktops/hyprland.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ def services(self) -> list[str]:
5454

5555
def _ask_seat_access(self) -> None:
5656
# need to activate seat service and add to seat group
57-
header = str(_('Hyprland needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)'))
57+
header = str(
58+
_(
59+
'Hyprland needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)',
60+
),
61+
)
5862
header += '\n' + str(_('Choose an option to give Hyprland access to your hardware')) + '\n'
5963

6064
items = [MenuItem(s.value, value=s) for s in SeatAccess]

archinstall/default_profiles/desktops/labwc.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def services(self) -> list[str]:
5151

5252
def _ask_seat_access(self) -> None:
5353
# need to activate seat service and add to seat group
54-
header = str(_('labwc needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)'))
54+
header = str(
55+
_(
56+
'labwc needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)',
57+
),
58+
)
5559
header += '\n' + str(_('Choose an option to give labwc access to your hardware')) + '\n'
5660

5761
items = [MenuItem(s.value, value=s) for s in SeatAccess]

archinstall/default_profiles/desktops/niri.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ def services(self) -> list[str]:
5959

6060
def _ask_seat_access(self) -> None:
6161
# need to activate seat service and add to seat group
62-
header = str(_('niri needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)'))
62+
header = str(
63+
_(
64+
'niri needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)',
65+
),
66+
)
6367
header += '\n' + str(_('Choose an option to give niri access to your hardware')) + '\n'
6468

6569
items = [MenuItem(s.value, value=s) for s in SeatAccess]

archinstall/default_profiles/desktops/sway.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ def services(self) -> list[str]:
6161

6262
def _ask_seat_access(self) -> None:
6363
# need to activate seat service and add to seat group
64-
header = str(_('Sway needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)'))
64+
header = str(
65+
_(
66+
'Sway needs access to your seat (collection of hardware devices i.e. keyboard, mouse, etc)',
67+
),
68+
)
6569
header += '\n' + str(_('Choose an option to give Sway access to your hardware')) + '\n'
6670

6771
items = [MenuItem(s.value, value=s) for s in SeatAccess]

archinstall/default_profiles/profile.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,13 @@ def reset(self) -> None:
151151
self.current_selection = []
152152

153153
def is_top_level_profile(self) -> bool:
154-
top_levels = [ProfileType.Desktop, ProfileType.Server, ProfileType.Xorg, ProfileType.Minimal, ProfileType.Custom]
154+
top_levels = [
155+
ProfileType.Desktop,
156+
ProfileType.Server,
157+
ProfileType.Xorg,
158+
ProfileType.Minimal,
159+
ProfileType.Custom,
160+
]
155161
return self.profile_type in top_levels
156162

157163
def is_desktop_profile(self) -> bool:
@@ -161,7 +167,11 @@ def is_server_type_profile(self) -> bool:
161167
return self.profile_type == ProfileType.ServerType
162168

163169
def is_desktop_type_profile(self) -> bool:
164-
return (self.profile_type == ProfileType.DesktopEnv or self.profile_type == ProfileType.WindowMgr) if self._advanced_check() else False
170+
return (
171+
(self.profile_type == ProfileType.DesktopEnv or self.profile_type == ProfileType.WindowMgr)
172+
if self._advanced_check()
173+
else False
174+
)
165175

166176
def is_xorg_type_profile(self) -> bool:
167177
return self.profile_type == ProfileType.Xorg if self._advanced_check() else False

archinstall/default_profiles/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,6 @@ def install(self, install_session: 'Installer') -> None:
7171
install_session.enable_service(server.services)
7272
server.install(install_session)
7373

74-
info('If your selections included multiple servers with the same port, you may have to reconfigure them.')
74+
info(
75+
'If your selections included multiple servers with the same port, you may have to reconfigure them.',
76+
)

archinstall/default_profiles/servers/mariadb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,6 @@ def services(self) -> list[str]:
2525

2626
@override
2727
def post_install(self, install_session: 'Installer') -> None:
28-
install_session.arch_chroot('mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql')
28+
install_session.arch_chroot(
29+
'mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql',
30+
)

archinstall/lib/args.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ class Arguments:
6262
class ArchConfig:
6363
version: str | None = None
6464
locale_config: LocaleConfiguration | None = None
65-
archinstall_language: Language = field(default_factory=lambda: translation_handler.get_language_by_abbr('en'))
65+
archinstall_language: Language = field(
66+
default_factory=lambda: translation_handler.get_language_by_abbr('en'),
67+
)
6668
disk_config: DiskLayoutConfiguration | None = None
6769
profile_config: ProfileConfiguration | None = None
6870
mirror_config: MirrorConfiguration | None = None
@@ -140,7 +142,9 @@ def from_config(cls, args_config: dict[str, Any]) -> 'ArchConfig':
140142
arch_config.locale_config = LocaleConfiguration.parse_arg(args_config)
141143

142144
if archinstall_lang := args_config.get('archinstall-language', None):
143-
arch_config.archinstall_language = translation_handler.get_language_by_name(archinstall_lang)
145+
arch_config.archinstall_language = translation_handler.get_language_by_name(
146+
archinstall_lang,
147+
)
144148

145149
if disk_config := args_config.get('disk_config', {}):
146150
arch_config.disk_config = DiskLayoutConfiguration.parse_arg(disk_config)
@@ -383,7 +387,9 @@ def _parse_args(self) -> Arguments:
383387
args.silent = False
384388

385389
if args.debug:
386-
warn(f'Warning: --debug mode will write certain credentials to {storage["LOG_PATH"]}/{storage["LOG_FILE"]}!')
390+
warn(
391+
f'Warning: --debug mode will write certain credentials to {storage["LOG_PATH"]}/{storage["LOG_FILE"]}!',
392+
)
387393

388394
if args.plugin:
389395
plugin_path = Path(args.plugin)

0 commit comments

Comments
 (0)