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:
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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user