chore(dotfiles): streamline workstation configuration workflows

This commit is contained in:
2026-08-25 00:00:55 +02:00
parent a81bbf5115
commit 4a20edba5c
12 changed files with 279 additions and 18 deletions
+15
View File
@@ -30,11 +30,13 @@ class UserConfigConcern(decman.Module):
name: str,
files: dict[str, str | tuple[str, int]] | None = None,
directories: dict[str, str] | None = None,
symlinks: dict[str, str] | None = None,
user: str = "alex",
) -> None:
super().__init__(f"user:{name}")
self._files = files or {}
self._directories = directories or {}
self._symlinks = symlinks or {}
self.user = user
def files(self) -> dict[str, decman.File]:
@@ -60,6 +62,12 @@ class UserConfigConcern(decman.Module):
for target, source in self._directories.items()
}
def symlinks(self) -> dict[str, str | decman.Symlink]:
return {
link_name: decman.Symlink(target=target, owner=self.user)
for link_name, target in self._symlinks.items()
}
class SystemConcern(decman.Module):
"""One host/system concern with explicit files and unit manifests."""
@@ -177,6 +185,11 @@ def laptop_user_config() -> list[UserConfigConcern]:
"config/user/laptop/noctalia/99-extend.toml"
),
},
symlinks={
"/home/alex/.config/hypr/intel-drm": (
"/dev/dri/by-path/pci-0000:00:02.0-card"
),
},
)
]
@@ -242,6 +255,8 @@ def laptop_system() -> list[SystemConcern | UserConfigConcern]:
"/etc/keyd/default.conf": "config/system/common/keyd.conf",
"/etc/NetworkManager/conf.d/wifi-powersave.conf": "config/system/laptop/wifi-powersave.conf",
"/etc/modprobe.d/iwlwifi.conf": "config/system/laptop/iwlwifi.conf",
"/etc/modprobe.d/nvidia-runtime-pm.conf": "config/system/laptop/modprobe.d/nvidia-runtime-pm.conf",
"/etc/udev/rules.d/80-nvidia-runtime-pm.rules": "config/system/laptop/udev/80-nvidia-runtime-pm.rules",
"/etc/X11/xorg.conf.d/30-touchpad.conf": "config/system/laptop/touchpad.conf",
"/etc/tlp.conf": "config/system/laptop/power/tlp.conf",
"/etc/systemd/sleep.conf.d/90-laptop.conf": "config/system/laptop/sleep.conf.d/90-laptop.conf",