Merge pull request 'cache nix_config' (#3306) from nix-config into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3306
This commit is contained in:
Mic92
2025-04-14 11:23:33 +00:00

View File

@@ -2,6 +2,7 @@ import json
import logging
import os
import tempfile
from functools import cache
from pathlib import Path
from typing import Any
@@ -51,6 +52,7 @@ def nix_add_to_gcroots(nix_path: Path, dest: Path) -> None:
run(cmd)
@cache
def nix_config() -> dict[str, Any]:
cmd = nix_command(["config", "show", "--json"])
proc = run_no_stdout(cmd)