@@ -168,7 +168,7 @@ pub enum GetDeploymentDataError {
168168/// Evaluates the Nix in the given `repo` and return the processed Data from it
169169async fn get_deployment_data (
170170 supports_flakes : bool ,
171- flakes : & [ data:: DeployFlake < ' _ > ] ,
171+ flakes : & [ data:: Target ] ,
172172 extra_build_args : & [ String ] ,
173173) -> Result < Vec < settings:: Root > , GetDeploymentDataError > {
174174 futures_util:: stream:: iter ( flakes) . then ( |flake| async move {
@@ -272,7 +272,7 @@ struct PromptPart<'a> {
272272
273273fn print_deployment (
274274 parts : & [ (
275- & data:: DeployFlake < ' _ > ,
275+ & data:: Target ,
276276 data:: DeployData ,
277277 data:: DeployDefs ,
278278 ) ] ,
@@ -315,7 +315,7 @@ pub enum PromptDeploymentError {
315315
316316fn prompt_deployment (
317317 parts : & [ (
318- & data:: DeployFlake < ' _ > ,
318+ & data:: Target ,
319319 data:: DeployData ,
320320 data:: DeployDefs ,
321321 ) ] ,
@@ -388,14 +388,14 @@ pub enum RunDeployError {
388388}
389389
390390type ToDeploy < ' a > = Vec < (
391- & ' a data:: DeployFlake < ' a > ,
391+ & ' a data:: Target ,
392392 & ' a settings:: Root ,
393393 ( & ' a str , & ' a settings:: Node ) ,
394394 ( & ' a str , & ' a settings:: Profile ) ,
395395) > ;
396396
397397async fn run_deploy (
398- deploy_flakes : Vec < data:: DeployFlake < ' _ > > ,
398+ deploy_targets : Vec < data:: Target > ,
399399 data : Vec < settings:: Root > ,
400400 supports_flakes : bool ,
401401 check_sigs : bool ,
@@ -409,11 +409,11 @@ async fn run_deploy(
409409 log_dir : & Option < String > ,
410410 rollback_succeeded : bool ,
411411) -> Result < ( ) , RunDeployError > {
412- let to_deploy: ToDeploy = deploy_flakes
412+ let to_deploy: ToDeploy = deploy_targets
413413 . iter ( )
414414 . zip ( & data)
415- . map ( |( deploy_flake , data) | {
416- let to_deploys: ToDeploy = match ( & deploy_flake . node , & deploy_flake . profile ) {
415+ . map ( |( deploy_target , data) | {
416+ let to_deploys: ToDeploy = match ( & deploy_target . node , & deploy_target . profile ) {
417417 ( Some ( node_name) , Some ( profile_name) ) => {
418418 let node = match data. nodes . get ( node_name) {
419419 Some ( x) => x,
@@ -425,7 +425,7 @@ async fn run_deploy(
425425 } ;
426426
427427 vec ! [ (
428- deploy_flake ,
428+ deploy_target ,
429429 data,
430430 ( node_name. as_str( ) , node) ,
431431 ( profile_name. as_str( ) , profile) ,
@@ -459,7 +459,7 @@ async fn run_deploy(
459459
460460 profiles_list
461461 . into_iter ( )
462- . map ( |x| ( deploy_flake , data, ( node_name. as_str ( ) , node) , x) )
462+ . map ( |x| ( deploy_target , data, ( node_name. as_str ( ) , node) , x) )
463463 . collect ( )
464464 }
465465 ( None , None ) => {
@@ -490,7 +490,7 @@ async fn run_deploy(
490490
491491 let ll: ToDeploy = profiles_list
492492 . into_iter ( )
493- . map ( |x| ( deploy_flake , data, ( node_name. as_str ( ) , node) , x) )
493+ . map ( |x| ( deploy_target , data, ( node_name. as_str ( ) , node) , x) )
494494 . collect ( ) ;
495495
496496 l. extend ( ll) ;
@@ -508,12 +508,12 @@ async fn run_deploy(
508508 . collect ( ) ;
509509
510510 let mut parts: Vec < (
511- & data:: DeployFlake < ' _ > ,
511+ & data:: Target ,
512512 data:: DeployData ,
513513 data:: DeployDefs ,
514514 ) > = Vec :: new ( ) ;
515515
516- for ( deploy_flake , data, ( node_name, node) , ( profile_name, profile) ) in to_deploy {
516+ for ( deploy_target , data, ( node_name, node) , ( profile_name, profile) ) in to_deploy {
517517 let deploy_data = data:: make_deploy_data (
518518 & data. generic_settings ,
519519 node,
@@ -527,7 +527,7 @@ async fn run_deploy(
527527
528528 let deploy_defs = deploy_data. defs ( ) ?;
529529
530- parts. push ( ( deploy_flake , deploy_data, deploy_defs) ) ;
530+ parts. push ( ( deploy_target , deploy_data, deploy_defs) ) ;
531531 }
532532
533533 if interactive {
@@ -536,11 +536,11 @@ async fn run_deploy(
536536 print_deployment ( & parts[ ..] ) ?;
537537 }
538538
539- for ( deploy_flake , deploy_data, deploy_defs) in & parts {
539+ for ( deploy_target , deploy_data, deploy_defs) in & parts {
540540 deploy:: push:: push_profile ( deploy:: push:: PushProfileData {
541541 supports_flakes,
542542 check_sigs,
543- repo : deploy_flake . repo ,
543+ repo : & deploy_target . repo ,
544544 deploy_data,
545545 deploy_defs,
546546 keep_result,
@@ -595,7 +595,7 @@ pub enum RunError {
595595 #[ error( "Failed to evaluate deployment data: {0}" ) ]
596596 GetDeploymentData ( #[ from] GetDeploymentDataError ) ,
597597 #[ error( "Error parsing flake: {0}" ) ]
598- ParseFlake ( #[ from] data:: ParseFlakeError ) ,
598+ ParseFlake ( #[ from] data:: ParseTargetError ) ,
599599 #[ error( "Error initiating logger: {0}" ) ]
600600 Logger ( #[ from] flexi_logger:: FlexiLoggerError ) ,
601601 #[ error( "{0}" ) ]
@@ -619,10 +619,10 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> {
619619 . targets
620620 . unwrap_or_else ( || vec ! [ opts. clone( ) . target. unwrap_or_else( || "." . to_string( ) ) ] ) ;
621621
622- let deploy_flakes : Vec < data:: DeployFlake > = deploys
622+ let deploy_targets : Vec < data:: Target > = deploys
623623 . iter ( )
624- . map ( |f| data:: parse_flake ( f . as_str ( ) ) )
625- . collect :: < Result < Vec < data:: DeployFlake > , data:: ParseFlakeError > > ( ) ?;
624+ . map ( |f| f . parse :: < data:: Target > ( ) )
625+ . collect :: < Result < Vec < data:: Target > , data:: ParseTargetError > > ( ) ?;
626626
627627 let cmd_overrides = data:: CmdOverrides {
628628 ssh_user : opts. ssh_user ,
@@ -644,14 +644,14 @@ pub async fn run(args: Option<&ArgMatches>) -> Result<(), RunError> {
644644 }
645645
646646 if !opts. skip_checks {
647- for deploy_flake in & deploy_flakes {
648- check_deployment ( supports_flakes, deploy_flake . repo , & opts. extra_build_args ) . await ?;
647+ for deploy_target in deploy_targets . iter ( ) {
648+ check_deployment ( supports_flakes, & deploy_target . repo , & opts. extra_build_args ) . await ?;
649649 }
650650 }
651651 let result_path = opts. result_path . as_deref ( ) ;
652- let data = get_deployment_data ( supports_flakes, & deploy_flakes , & opts. extra_build_args ) . await ?;
652+ let data = get_deployment_data ( supports_flakes, & deploy_targets , & opts. extra_build_args ) . await ?;
653653 run_deploy (
654- deploy_flakes ,
654+ deploy_targets ,
655655 data,
656656 supports_flakes,
657657 opts. checksigs ,
0 commit comments