mirror of
https://github.com/mjallen18/snowfall-lib.git
synced 2026-04-18 09:05:58 -05:00
fix(module): preserve pkgs module arg binding
nix fmt collapsed a generated module wrapper to a plain args lambda, which broke modules expecting explicit pkgs injection during flake evaluation. Restore the named pkgs binding and keep formatter-driven rewrites from this run.
This commit is contained in:
@@ -214,8 +214,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
user-home-modules-list = mapAttrsToList (
|
user-home-modules-list = mapAttrsToList (
|
||||||
module-path: module:
|
module-path: module: args:
|
||||||
args:
|
|
||||||
(module args)
|
(module args)
|
||||||
// {
|
// {
|
||||||
_file = "${user-homes-root}/${module-path}/default.nix";
|
_file = "${user-homes-root}/${module-path}/default.nix";
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ in
|
|||||||
# NOTE: home-manager *requires* modules to specify named arguments or it will not
|
# NOTE: home-manager *requires* modules to specify named arguments or it will not
|
||||||
# pass values in. For this reason we must specify things like `pkgs` as a named attribute.
|
# pass values in. For this reason we must specify things like `pkgs` as a named attribute.
|
||||||
${metadata.name} =
|
${metadata.name} =
|
||||||
args:
|
args@{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
system = args.system or args.pkgs.stdenv.hostPlatform.system;
|
system = args.system or pkgs.stdenv.hostPlatform.system;
|
||||||
target = args.target or system;
|
target = args.target or system;
|
||||||
|
|
||||||
format =
|
format =
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ in
|
|||||||
${namespace} = (prev.${namespace} or { }) // user-packages;
|
${namespace} = (prev.${namespace} or { }) // user-packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
create-overlay = overlays: file:
|
create-overlay =
|
||||||
|
overlays: file:
|
||||||
let
|
let
|
||||||
# We are building flake outputs based on file paths. Nix doesn't allow this
|
# We are building flake outputs based on file paths. Nix doesn't allow this
|
||||||
# so we have to explicitly discard the string's path context to use it as an attribute name.
|
# so we have to explicitly discard the string's path context to use it as an attribute name.
|
||||||
|
|||||||
Reference in New Issue
Block a user