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", "type": "object",
"description": "Settings for the bootloader, such as theme, using os-prober, etc", "description": "Settings for the bootloader, such as theme, using os-prober, etc",
"properties": { "properties": {
"managed": {
"type": "boolean",
"description": "Whether or not to manage the bootloader using archmgr"
},
"bootloader": { "bootloader": {
"type": "string", "type": "string",
"description": "The bootloader to use (more coming eventually)", "description": "The bootloader to use (more coming eventually)",
@@ -198,8 +202,7 @@
}, },
"additionalProperties": false, "additionalProperties": false,
"required": [ "required": [
"bootloader", "managed"
"esp_dir"
] ]
}, },
"themes": { "themes": {
+9 -1
View File
@@ -1,9 +1,17 @@
from typing import TypedDict 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 from config.dtype.pkgs import ArchMgrPkgConfig
class ArchMgrConfig(TypedDict): class ArchMgrConfig(TypedDict):
pkgs: ArchMgrPkgConfig pkgs: ArchMgrPkgConfig
users: list[ArchMgrUserConfig] 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): class ArchMgrCmdsConfig(TypedDict):
always: ArchMgrCommand always: list[ArchMgrCommand]
once: ArchMgrCommand once: list[ArchMgrCommand]
class ArchMgrCommand(TypedDict): class ArchMgrCommand(TypedDict):
+6 -2
View File
@@ -2,8 +2,12 @@ from typing import TypedDict
class ArchMgrGitConfig(TypedDict): class ArchMgrGitConfig(TypedDict):
creds: dict # TODO: creds: ArchMgrGitCredsConfig
repos: dict # TODO repos: list[ArchMgrGitRepoConfig]
class ArchMgrGitCredsConfig(TypedDict):
manager: str
class ArchMgrGitRepoConfig(TypedDict): class ArchMgrGitRepoConfig(TypedDict):
+12
View File
@@ -5,9 +5,11 @@ class ArchMgrUserConfig(TypedDict):
username: str username: str
groups: list[str] groups: list[str]
home_dir: bool home_dir: bool
sudo_user: bool
class ArchMgrBootConfig(TypedDict): class ArchMgrBootConfig(TypedDict):
managed: bool
bootloader: str bootloader: str
esp_dir: str esp_dir: str
theme_folder: str theme_folder: str
@@ -20,3 +22,13 @@ class ArchMgrThemeConfig(TypedDict):
font: str font: str
icon_theme: str icon_theme: str
cursor_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): class ArchMgrPkgConfig(TypedDict):
individual: list[str] individual: list[str]
repos: ArchMgrReposConfig
bundles: list[ArchMgrBundleConfig] bundles: list[ArchMgrBundleConfig]
repos: ArchMgrRepoSettings
class ArchMgrReposConfig(TypedDict): class ArchMgrReposConfig(TypedDict):