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.nixdiffbeforeafterboth--- a/modules/nixos/meta.nix
+++ b/modules/nixos/meta.nix
@@ -1,24 +1,8 @@
-{
- lib,
- pkgs,
- ...
-}: let
- inherit (lib.options) mkOption;
+{lib, ...}: let
inherit (lib.modules) mkRemovedOptionModule;
in {
- options = {
- # TODO: Give a real name.
- # Previously it was nixpkgs.resolvedPkgs, which was erroreously merged with nixpkgs override attribute.
- _resolvedPkgs = mkOption {
- type = lib.types.pkgs // {description = "nixpkgs.pkgs";};
- description = "Value of pkgs";
- };
- };
imports = [
(mkRemovedOptionModule ["tags"] "tags are now defined at the host level, not the nixos system level for fast filtering without evaluating unnecessary hosts.")
(mkRemovedOptionModule ["network"] "network is now defined at the host level, not the nixos system level")
];
- config = {
- _resolvedPkgs = pkgs;
- };
}