difftreelog
fix secret generation
in: trunk
3 files changed
crates/fleet-base/src/host.rsdiffbeforeafterboth616162 pub host_config: Option<Value>,62 pub host_config: Option<Value>,63 pub nixos_config: OnceCell<Value>,63 pub nixos_config: OnceCell<Value>,64 pub pkgs_override: Option<Value>,646565 // TODO: Move command helpers away with connectivity refactor66 // TODO: Move command helpers away with connectivity refactor66 pub local: bool,67 pub local: bool,297298298 /// Packages for this host, resolved with nixpkgs overlays299 /// Packages for this host, resolved with nixpkgs overlays299 pub async fn pkgs(&self) -> Result<Value> {300 pub async fn pkgs(&self) -> Result<Value> {301 if let Some(value) = &self.pkgs_override {302 return Ok(value.clone());303 }300 let Some(host_config) = &self.host_config else {304 let Some(host_config) = &self.host_config else {301 bail!("local host has no host_config");305 bail!("local host has no host_config");302 };306 };310 ConfigHost {314 ConfigHost {311 config: self.clone(),315 config: self.clone(),312 name: "<virtual localhost>".to_owned(),316 name: "<virtual localhost>".to_owned(),313 local: true,314 session: OnceLock::new(),315 host_config: None,317 host_config: None,316 nixos_config: OnceCell::new(),318 nixos_config: OnceCell::new(),317 groups: {319 groups: {318 let cell = OnceCell::new();320 let cell = OnceCell::new();319 let _ = cell.set(vec![]);321 let _ = cell.set(vec![]);320 cell322 cell321 },323 },324 pkgs_override: Some(self.default_pkgs.clone()),325326 local: true,327 session: OnceLock::new(),322 }328 }323 }329 }324330332 host_config: Some(host_config),338 host_config: Some(host_config),333 nixos_config: OnceCell::new(),339 nixos_config: OnceCell::new(),334 groups: OnceCell::new(),340 groups: OnceCell::new(),335 341 pkgs_override: None,342336 // TODO: Remove with connectivit refactor343 // TODO: Remove with connectivit refactor337 local: self.localhost == name,344 local: self.localhost == name,crates/fleet-base/src/opts.rsdiffbeforeafterboth--- a/crates/fleet-base/src/opts.rs
+++ b/crates/fleet-base/src/opts.rs
@@ -196,11 +196,11 @@
let import = nix_go!(builtins_field.import);
let overlays = nix_go!(config_field.nixpkgs.overlays);
- let nixpkgs = nix_go!(fleet_field.nixpkgs.buildUsing | import);
+ let nixpkgs = nix_go!(config_field.nixpkgs.buildUsing | import);
let default_pkgs = nix_go!(nixpkgs(Obj {
overlays,
- system: { self.local_system.clone() },
+ system: { local_system.clone() },
}));
Ok(Config(Arc::new(FleetConfigInternals {
lib/flakePart.nixdiffbeforeafterboth--- a/lib/flakePart.nix
+++ b/lib/flakePart.nix
@@ -9,7 +9,6 @@
inherit (lib.attrsets) mapAttrs;
inherit (lib.types) lazyAttrsOf deferredModule unspecified;
inherit (lib.strings) isPath;
- inherit (fleetLib.options) mkHostsOption;
in {
options.fleetModules = mkOption {
type = lazyAttrsOf unspecified;
@@ -42,20 +41,18 @@
++ [
module
{
- options.hosts = mkHostsOption {
- nixos.nixpkgs.overlays = [
+ config = {
+ data =
+ if isPath data
+ then import data
+ else data;
+ nixpkgs.overlays = [
(final: prev:
import ../pkgs {
inherit (prev) callPackage;
craneLib = crane.mkLib prev;
})
];
- };
- config = {
- data =
- if isPath data
- then import data
- else data;
};
}
];