feat(typing): possibly complete

This commit is contained in:
2026-05-03 14:24:03 +02:00
parent f9e6120910
commit 190fb86758
6 changed files with 35 additions and 8 deletions
+5 -2
View File
@@ -176,6 +176,10 @@
"type": "object",
"description": "Settings for the bootloader, such as theme, using os-prober, etc",
"properties": {
"managed": {
"type": "boolean",
"description": "Whether or not to manage the bootloader using archmgr"
},
"bootloader": {
"type": "string",
"description": "The bootloader to use (more coming eventually)",
@@ -198,8 +202,7 @@
},
"additionalProperties": false,
"required": [
"bootloader",
"esp_dir"
"managed"
]
},
"themes": {
+9 -1
View File
@@ -1,9 +1,17 @@
from typing import TypedDict
from config.dtype.others import ArchMgrUserConfig
from config.dtype.cmds import ArchMgrCmdsConfig
from config.dtype.git import ArchMgrGitConfig
from config.dtype.others import ArchMgrBootConfig, ArchMgrSymlinkConfig, ArchMgrTemplateData, ArchMgrThemeConfig, ArchMgrUserConfig
from config.dtype.pkgs import ArchMgrPkgConfig
class ArchMgrConfig(TypedDict):
pkgs: ArchMgrPkgConfig
users: list[ArchMgrUserConfig]
boot: ArchMgrBootConfig
themes: ArchMgrThemeConfig
git: ArchMgrGitConfig
template_data: list[ArchMgrTemplateData]
symlinks: list[ArchMgrSymlinkConfig]
cmds: ArchMgrCmdsConfig
+2 -2
View File
@@ -2,8 +2,8 @@ from typing import Optional, TypedDict
class ArchMgrCmdsConfig(TypedDict):
always: ArchMgrCommand
once: ArchMgrCommand
always: list[ArchMgrCommand]
once: list[ArchMgrCommand]
class ArchMgrCommand(TypedDict):
+6 -2
View File
@@ -2,8 +2,12 @@ from typing import TypedDict
class ArchMgrGitConfig(TypedDict):
creds: dict # TODO:
repos: dict # TODO
creds: ArchMgrGitCredsConfig
repos: list[ArchMgrGitRepoConfig]
class ArchMgrGitCredsConfig(TypedDict):
manager: str
class ArchMgrGitRepoConfig(TypedDict):
+12
View File
@@ -5,9 +5,11 @@ class ArchMgrUserConfig(TypedDict):
username: str
groups: list[str]
home_dir: bool
sudo_user: bool
class ArchMgrBootConfig(TypedDict):
managed: bool
bootloader: str
esp_dir: str
theme_folder: str
@@ -20,3 +22,13 @@ class ArchMgrThemeConfig(TypedDict):
font: str
icon_theme: str
cursor_theme: str
class ArchMgrTemplateData(TypedDict):
name: str
data: str
class ArchMgrSymlinkConfig(TypedDict):
destination: str
location: str
+1 -1
View File
@@ -3,8 +3,8 @@ from typing import Optional, TypedDict
class ArchMgrPkgConfig(TypedDict):
individual: list[str]
repos: ArchMgrReposConfig
bundles: list[ArchMgrBundleConfig]
repos: ArchMgrRepoSettings
class ArchMgrReposConfig(TypedDict):