cli,nix: Add machine_icon, machine_description

This commit is contained in:
Qubasa
2024-02-06 19:25:34 +07:00
parent be2557152a
commit 8194b61e4b
6 changed files with 48 additions and 6 deletions

View File

@@ -53,6 +53,11 @@ def nix_build(flags: list[str], gcroot: Path | None = None) -> list[str]:
)
def nix_add_to_gcroots(nix_path: Path, dest: Path) -> None:
cmd = ["nix-store", "--realise", f"{nix_path}", "--add-root", f"{dest}"]
run(cmd)
def nix_config() -> dict[str, Any]:
cmd = nix_command(["show-config", "--json"])
proc = run(cmd)