git.delta.rocks / jrsonnet / refs/commits / 505f82ed3097

difftreelog

refactor remove _resolvedPkgs option

Yaroslav Bolyukin2024-08-18parent: #d2cec5d.patch.diff
in: trunk

2 files changed

modifiedcmds/fleet/src/host.rsdiffbeforeafterboth
301301
302 /// Packages for this host, resolved with nixpkgs overlays302 /// Packages for this host, resolved with nixpkgs overlays
303 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}
308311
modifiedmodules/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;
-  };
 }