difftreelog
refactor remove _resolvedPkgs option
in: trunk
2 files changed
cmds/fleet/src/host.rsdiffbeforeafterboth301301302 /// Packages for this host, resolved with nixpkgs overlays302 /// Packages for this host, resolved with nixpkgs overlays303 pub async fn pkgs(&self) -> Result<Value> {303 pub async fn pkgs(&self) -> Result<Value> {304 let nixos = self.nixos_config().await?;304 let Some(host_config) = &self.host_config else {305 bail!("local host has no host_config");306 };307 // TODO: Should nixos.options be cached?305 Ok(nix_go!(nixos._resolvedPkgs))308 Ok(nix_go!(host_config.nixos.options._module.args.value.pkgs))306 }309 }307}310}308311modules/nixos/meta.nixdiffbeforeafterboth1{1{lib, ...}: let2 lib,3 pkgs,4 ...5}: let6 inherit (lib.options) mkOption;7 inherit (lib.modules) mkRemovedOptionModule;2 inherit (lib.modules) mkRemovedOptionModule;8in {3in {9 options = {10 # TODO: Give a real name.11 # Previously it was nixpkgs.resolvedPkgs, which was erroreously merged with nixpkgs override attribute.12 _resolvedPkgs = mkOption {13 type = lib.types.pkgs // {description = "nixpkgs.pkgs";};14 description = "Value of pkgs";15 };16 };17 imports = [4 imports = [18 (mkRemovedOptionModule ["tags"] "tags are now defined at the host level, not the nixos system level for fast filtering without evaluating unnecessary hosts.")5 (mkRemovedOptionModule ["tags"] "tags are now defined at the host level, not the nixos system level for fast filtering without evaluating unnecessary hosts.")19 (mkRemovedOptionModule ["network"] "network is now defined at the host level, not the nixos system level")6 (mkRemovedOptionModule ["network"] "network is now defined at the host level, not the nixos system level")20 ];7 ];21 config = {22 _resolvedPkgs = pkgs;23 };24}8}259