@@ -13,7 +13,7 @@ use validator::Validate;
1313
1414use super :: deployment:: TargetNode ;
1515use super :: {
16- Flake , MetaConfig , NixExpression , NixOptions , NodeConfig , NodeFilter , NodeName ,
16+ Flake , MetaConfig , NixExpression , NixFlags , NodeConfig , NodeFilter , NodeName ,
1717 ProfileDerivation , SerializedNixExpression , StorePath ,
1818} ;
1919use crate :: error:: ColmenaResult ;
@@ -140,25 +140,25 @@ impl Hive {
140140 }
141141
142142 /// Returns Nix options to set for this Hive.
143- pub fn nix_options ( & self ) -> NixOptions {
144- let mut options = NixOptions :: default ( ) ;
145- options . set_show_trace ( self . show_trace ) ;
146- options . set_pure_eval ( self . path . is_flake ( ) ) ;
147- options . set_impure ( self . impure ) ;
148- options . set_options ( self . nix_options . clone ( ) ) ;
149- options
143+ pub fn nix_flags ( & self ) -> NixFlags {
144+ let mut flags = NixFlags :: default ( ) ;
145+ flags . set_show_trace ( self . show_trace ) ;
146+ flags . set_pure_eval ( self . path . is_flake ( ) ) ;
147+ flags . set_impure ( self . impure ) ;
148+ flags . set_options ( self . nix_options . clone ( ) ) ;
149+ flags
150150 }
151151
152- /// Returns Nix options to set for this Hive, with configured remote builders.
153- pub async fn nix_options_with_builders ( & self ) -> ColmenaResult < NixOptions > {
154- let mut options = NixOptions :: default ( ) ;
155- options . set_show_trace ( self . show_trace ) ;
152+ /// Returns Nix flags to set for this Hive, with configured remote builders.
153+ pub async fn nix_flags_with_builders ( & self ) -> ColmenaResult < NixFlags > {
154+ let mut flags = NixFlags :: default ( ) ;
155+ flags . set_show_trace ( self . show_trace ) ;
156156
157157 if let Some ( machines_file) = & self . get_meta_config ( ) . await ?. machines_file {
158- options . set_builders ( Some ( format ! ( "@{}" , machines_file) ) ) ;
158+ flags . set_builders ( Some ( format ! ( "@{}" , machines_file) ) ) ;
159159 }
160160
161- Ok ( options )
161+ Ok ( flags )
162162 }
163163
164164 /// Convenience wrapper to filter nodes for CLI actions.
@@ -432,32 +432,32 @@ impl<'hive> NixInstantiate<'hive> {
432432
433433 fn eval ( self ) -> Command {
434434 let mut command = self . instantiate ( ) ;
435- let options = self . hive . nix_options ( ) ;
435+ let flags = self . hive . nix_flags ( ) ;
436436 command
437437 . arg ( "--eval" )
438438 . arg ( "--json" )
439439 . arg ( "--strict" )
440440 // Ensures the derivations are instantiated
441441 // Required for system profile evaluation and IFD
442442 . arg ( "--read-write-mode" )
443- . args ( options . to_args ( ) ) ;
443+ . args ( flags . to_args ( ) ) ;
444444 command
445445 }
446446
447447 async fn instantiate_with_builders ( self ) -> ColmenaResult < Command > {
448- let options = self . hive . nix_options_with_builders ( ) . await ?;
448+ let flags = self . hive . nix_flags_with_builders ( ) . await ?;
449449 let mut command = self . instantiate ( ) ;
450450
451- command. args ( options . to_args ( ) ) ;
451+ command. args ( flags . to_args ( ) ) ;
452452
453453 Ok ( command)
454454 }
455455
456456 async fn eval_with_builders ( self ) -> ColmenaResult < Command > {
457- let options = self . hive . nix_options_with_builders ( ) . await ?;
457+ let flags = self . hive . nix_flags_with_builders ( ) . await ?;
458458 let mut command = self . eval ( ) ;
459459
460- command. args ( options . to_args ( ) ) ;
460+ command. args ( flags . to_args ( ) ) ;
461461
462462 Ok ( command)
463463 }
0 commit comments