Skip to content

Commit

Permalink
refactor: remove outputsForTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
GTrunSec committed Sep 29, 2023
1 parent 62b7fb8 commit 7851bc6
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/haumea/nixosModules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ let
)
)
));

isEvalModule = l.elem cfg.type [
"nixosModules"
"evalModules"
];

base =
{
extenders ? [ ],
Expand Down Expand Up @@ -66,9 +72,13 @@ let
inherit mkModulePath;
moduleArgs = config._module.args // config._module.specialArgs;
}
// l.optionalAttrs (cfg == "nixosModules" || cfg.type == "nixosProfiles") {
pkgs = config._module.args.pkgs;
}
//
l.optionalAttrs
(l.elem cfg.type [
"nixosModules"
"nixosProfiles"
])
{ pkgs = config._module.args.pkgs; }
)
);

Expand All @@ -92,7 +102,7 @@ let
s3Module = mkExtenders (winnow path s3 mkModulePath) path;
s3Profile = mkExtenders s3 path;
in
if cfg.type == "nixosModules" then s3Module else s3Profile;
if isEvalModule then s3Module else s3Profile;

mkExtenders =
module: path:
Expand Down

0 comments on commit 7851bc6

Please sign in to comment.