difftreelog
refactor remove _resolvedPkgs option
in: trunk
2 files changed
cmds/fleet/src/host.rsdiffbeforeafterboth--- a/cmds/fleet/src/host.rs
+++ b/cmds/fleet/src/host.rs
@@ -301,8 +301,11 @@
/// Packages for this host, resolved with nixpkgs overlays
pub async fn pkgs(&self) -> Result<Value> {
- let nixos = self.nixos_config().await?;
- Ok(nix_go!(nixos._resolvedPkgs))
+ let Some(host_config) = &self.host_config else {
+ bail!("local host has no host_config");
+ };
+ // TODO: Should nixos.options be cached?
+ Ok(nix_go!(host_config.nixos.options._module.args.value.pkgs))
}
}
@@ -395,7 +398,6 @@
pub async fn host(&self, name: &str) -> Result<ConfigHost> {
let config = &self.config_field;
let host_config = nix_go!(config.hosts[{ name }]);
-
Ok(ConfigHost {
config: self.clone(),
modules/nixos/meta.nixdiffbeforeafterboth1{lib, ...}: let2 inherit (lib.modules) mkRemovedOptionModule;3in {4 imports = [5 (mkRemovedOptionModule ["tags"] "tags are now defined at the host level, not the nixos system level for fast filtering without evaluating unnecessary hosts.")6 (mkRemovedOptionModule ["network"] "network is now defined at the host level, not the nixos system level")7 ];8}