You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fixMergeModules is deprecated and using it produces deprecation
warning messages in newer revisions of nixpkgs. Since it's implemented
as a simple wrapper around evalModules, let's just use evalModules
instead and set the module arguments through config._module.args.
(key: lib.warn"Resource ${name} accesses nodes.${nodeName}.${key}, which is deprecated. Use the equivalent option instead: nodes.${nodeName}.${newOptkey}.")
136
-
info.machines.${nodeName}
137
-
//node)
138
-
nodes;
139
-
}
140
-
).config)["_module"])_resources;
125
+
lib.mapAttrs
126
+
(name: defs:
127
+
let
128
+
# Arguments fed to all modules
129
+
moduleArgs={
130
+
_module.args={
131
+
inheritpkgsuuidnameresources;
132
+
133
+
# inherit nodes, essentially
134
+
nodes=
135
+
lib.mapAttrs
136
+
(nodeName: node:
137
+
lib.mapAttrs
138
+
(key: lib.warn"Resource ${name} accesses nodes.${nodeName}.${key}, which is deprecated. Use the equivalent option instead: nodes.${nodeName}.${newOptkey}.")
139
+
info.machines.${nodeName}
140
+
//node)
141
+
nodes;
142
+
};
143
+
_module.check=false;
144
+
};
145
+
modules=[
146
+
moduleArgs
147
+
mainModule
148
+
deploymentInfoModule
149
+
./resource.nix
150
+
]++defs;
151
+
in
152
+
builtins.removeAttrs
153
+
(lib.evalModules{inheritmodules;}).config
154
+
["_module"])
155
+
_resources;
141
156
142
157
newOpt=key: {
143
158
nixosRelease="config.system.nixos.release and make sure it is set properly";
0 commit comments