From 1c0427862e47ecce41a2c169eec251570d170fd3 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 10 Oct 2023 13:20:34 +0200 Subject: [PATCH 1/2] nixos/eval-config.nix: Rename let withExtraArgs -> withExtraAttrs Presumably it only used to add `extraArgs`, but it also adds other attributes now. --- nixos/lib/eval-config.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index c00ba1bdc04e..0b151cbd85ca 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -107,10 +107,10 @@ let nixosWithUserModules = noUserModules.extendModules { modules = allUserModules; }; - withExtraArgs = nixosSystem: nixosSystem // { + withExtraAttrs = nixosSystem: nixosSystem // { inherit extraArgs; inherit (nixosSystem._module.args) pkgs; - extendModules = args: withExtraArgs (nixosSystem.extendModules args); + extendModules = args: withExtraAttrs (nixosSystem.extendModules args); }; in -withWarnings (withExtraArgs nixosWithUserModules) +withWarnings (withExtraAttrs nixosWithUserModules) From a14f3f829d46d3273c03f4fd9037c0e9f9ada5ae Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 10 Oct 2023 13:23:56 +0200 Subject: [PATCH 2/2] nixos/eval-config.nix: Rename arg nixosSystem -> configuration For some time now the attrset returned by `evalModules` has `type = "configuration"`. This is a clean refactor because the name is not exposed. (never is for simple lambda) --- nixos/lib/eval-config.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 0b151cbd85ca..da099f86aa2c 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -107,10 +107,10 @@ let nixosWithUserModules = noUserModules.extendModules { modules = allUserModules; }; - withExtraAttrs = nixosSystem: nixosSystem // { + withExtraAttrs = configuration: configuration // { inherit extraArgs; - inherit (nixosSystem._module.args) pkgs; - extendModules = args: withExtraAttrs (nixosSystem.extendModules args); + inherit (configuration._module.args) pkgs; + extendModules = args: withExtraAttrs (configuration.extendModules args); }; in withWarnings (withExtraAttrs nixosWithUserModules)