clan-cli machines: get flake path via flake metadata
This commit is contained in:
parent
6b9f8b851e
commit
0366147235
@ -3,7 +3,7 @@ import logging
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from ..cmd import run
|
from ..cmd import run
|
||||||
from ..nix import nix_build, nix_config, nix_eval
|
from ..nix import nix_build, nix_config, nix_eval, nix_metadata
|
||||||
from ..ssh import Host, parse_deployment_address
|
from ..ssh import Host, parse_deployment_address
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -78,9 +78,7 @@ class Machine:
|
|||||||
if hasattr(self, "flake_path"):
|
if hasattr(self, "flake_path"):
|
||||||
return Path(self.flake_path)
|
return Path(self.flake_path)
|
||||||
|
|
||||||
print(nix_eval([f"{self.flake}"]))
|
self.flake_path = nix_metadata(self.flake)["path"]
|
||||||
print(f"self.flake:{self.flake}. Type: {type(self.flake)}")
|
|
||||||
self.flake_path = run(nix_eval([f"{self.flake} "])).stdout.strip()
|
|
||||||
return Path(self.flake_path)
|
return Path(self.flake_path)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user