Python-based Arch System Config Helper
Find a file
2026-02-03 15:57:15 +01:00
.vscode Switch to stable prettier version again for now 2026-01-21 16:28:19 +01:00
pasch Uninstall optional dependencies 2026-02-03 15:57:15 +01:00
scripts Add orchestrator and Echo module 2025-08-29 22:42:51 +02:00
.gitignore Create project 2025-08-26 15:47:18 +02:00
.python-version Switch to Python 3.13 2025-08-31 19:53:37 +02:00
pyproject.toml Enable pyrefly in config 2025-11-04 02:39:04 +01:00
README.md Add usage example 2026-01-23 00:24:40 +01:00
uv.lock Add TomlFile 2025-11-03 02:04:07 +01:00

pasch

Python-based Arch System Config Helper

from argparse import ArgumentParser

from pasch import Orchestrator
from pasch.file import GitFile
from pasch.modules import Files, Pacman


def cfg_git(files: Files, pacman: Pacman) -> None:
    pacman.install("git")
    pacman.install("lazygit")

    git_config = GitFile()
    git_config.set("user", "name", "foo")
    git_config.set("user", "email", "foo@example.com")
    git_config.set("pull", "rebase", True)
    git_config.set("fetch", "prune", True)
    git_config.set("merge", "conflictstyle", "diff3")
    files.add(".config/git/config", git_config)


parser = ArgumentParser()
parser.add_argument("-d", "--dry-run", action="store_true")
args = parser.parse_args()

o = Orchestrator(dry_run=args.dry_run)

files = Files(o)
pacman = Pacman(o)
cfg_git(files, pacman)

o.realize()