nixos-rebuild-ng: generalize diff_closures

also adds support for remote hosts

Co-authored-by: Thiago Kenji Okada <thiagokokada@gmail.com>
This commit is contained in:
Electria
2026-02-11 06:59:04 -08:00
committed by GitHub
co-authored by Thiago Kenji Okada
parent 30cb9399cc
commit aaae02bd2a
@@ -537,16 +537,17 @@ def list_generations(profile: Profile) -> list[GenerationJson]:
reverse=True,
)
def diff_closures(path_to_config: Path):
def diff_closures(current_config: Path, new_config: Path, target_host: Remote | None = None):
run_wrapper(
[
"nix",
*FLAKE_FLAGS,
"store",
"diff-closures",
"/run/current-system",
path_to_config
]
current_config,
new_config,
],
remote=target_host,
)