api/flake/add: init

Adds an endpoint to memoize clans.
clan flakes can be added to the history either via the endpoint or by executing `clan flakes add`
This commit is contained in:
DavHau
2023-11-17 17:05:15 +07:00
parent 43dbdf20d4
commit 999ad67277
6 changed files with 90 additions and 1 deletions

View File

@@ -36,6 +36,10 @@ def user_config_dir() -> Path:
return Path(os.getenv("XDG_CONFIG_HOME", os.path.expanduser("~/.config")))
def user_history_file() -> Path:
return user_config_dir() / "clan" / "history"
def machines_dir(flake_dir: Path) -> Path:
return flake_dir / "machines"