diff --git a/nix/eval-machine-info.nix b/nix/eval-machine-info.nix index 5caab91a0..a6a2a8de1 100644 --- a/nix/eval-machine-info.nix +++ b/nix/eval-machine-info.nix @@ -48,9 +48,6 @@ in rec { # for backward compatibility network = lib.mapAttrs (n: v: [v]) net.config; networks = [ net.config ]; - - # skip problematic resources entries - resources = removeAttrs net.config.resources ["deployment" "_name" "_type"]; defaults = [ net.config.defaults ]; nodes = #TODO: take options and other modules outputs for each node lib.mapAttrs (n: v: { @@ -59,6 +56,11 @@ in rec { inherit (v.nixpkgs) pkgs; }) net.config.nodes; + # ./resource.nix is imported in resource opt but does not define resource types + # we have to remove those entries as they do not otherwise conform to the resource schema + resources = removeAttrs net.config.resources (lib.attrNames (import ./resource.nix { + name = ""; inherit lib; }).options); + importedPluginNixExprs = map import pluginNixExprs; pluginOptions = lib.lists.concatMap (e: e.options) importedPluginNixExprs; pluginResources = map (e: e.resources) importedPluginNixExprs; diff --git a/nix/resource.nix b/nix/resource.nix index 8e04aa98a..ba0e0cc90 100644 --- a/nix/resource.nix +++ b/nix/resource.nix @@ -1,4 +1,4 @@ -{ config, lib, name, ... }: +{ lib, name, ... }: with lib;