factory
get_package_manager(*, distro, manager)
¶
Return a unified package manager backend for the given environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
distro
|
str
|
A normalized distro identifier (e.g. |
required |
manager
|
str
|
The package manager identifier (e.g. |
required |
Returns:
| Type | Description |
|---|---|
PackageManager | None
|
A |
Source code in src/personal_os_setup/tasks/factory.py
get_system_action_sections(*, system, distro, info, packages=None)
¶
Build the ordered list of (section_name, [SystemAction]) tuples for this OS/distro.
Sections are assembled conditionally on system/distro: package-manager
sections always come first, then Start (all OSes), zsh/chezmoi (Linux+macOS),
system (NVIDIA/CUDA/docker/vicinae; Windows+Linux), and WSL/Windows-utility
sections (Windows only).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
system
|
str
|
Normalized OS family (e.g. |
required |
distro
|
str
|
Normalized distro identifier (e.g. |
required |
info
|
str | None
|
Extra environment info (e.g. WSL detection note), or |
required |
packages
|
list[PackageRef] | None
|
The full package catalog for this distro, used to populate the
"install zsh setup prerequisites" action in the dotfiles section (packages
tagged with the |
None
|