modules: fix consistent nixpkgs and nix-darwin injection
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
_module.args = {
|
||||
inherit clan-core;
|
||||
inherit (clan-core) clanLib;
|
||||
# TODO: This should be set via an option otherwise it is not possible to override
|
||||
inherit (clan-core.inputs) nixpkgs nix-darwin;
|
||||
};
|
||||
imports = [
|
||||
./module.nix
|
||||
|
||||
@@ -165,7 +165,6 @@ in
|
||||
config = {
|
||||
inventory.modules = clan-core.clanModules;
|
||||
inventory._legacyModules = clan-core.clanModules;
|
||||
# Merge the meta attributes from the buildClan function
|
||||
inventory.meta = config.meta;
|
||||
|
||||
outputs.moduleForMachine = lib.mkMerge [
|
||||
|
||||
@@ -7,18 +7,27 @@
|
||||
}:
|
||||
rec {
|
||||
buildClan =
|
||||
module: lib.warn "'buildClan' is deprecated. Use 'clan-core.lib.clan' instead" (clan module).config;
|
||||
# TODO: Once all templates and docs are migrated add: lib.warn "'buildClan' is deprecated. Use 'clan-core.lib.clan' instead"
|
||||
module: (clan module).config;
|
||||
|
||||
clan =
|
||||
{
|
||||
self ? lib.warn "Argument: 'self' must be set when using 'buildClan'." null, # Reference to the current flake
|
||||
self ? lib.warn "Argument: 'self' must be set" null, # Reference to the current flake
|
||||
...
|
||||
}@m:
|
||||
let
|
||||
nixpkgs = self.inputs.nixpkgs or clan-core.inputs.nixpkgs;
|
||||
nix-darwin = self.inputs.nix-darwin or clan-core.inputs.nix-darwin;
|
||||
in
|
||||
lib.evalModules {
|
||||
specialArgs = {
|
||||
inherit
|
||||
self
|
||||
;
|
||||
inherit
|
||||
nixpkgs
|
||||
nix-darwin
|
||||
;
|
||||
};
|
||||
modules = [
|
||||
m
|
||||
|
||||
Reference in New Issue
Block a user