modules.clan.default: move specialArgs into common place
This commit is contained in:
@@ -3,7 +3,6 @@ clan-core:
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
self,
|
self,
|
||||||
inputs,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -29,10 +28,7 @@ in
|
|||||||
default = { };
|
default = { };
|
||||||
type = types.submoduleWith {
|
type = types.submoduleWith {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit clan-core self;
|
inherit self;
|
||||||
inherit (inputs) nixpkgs nix-darwin;
|
|
||||||
# TODO: inject the inventory interface
|
|
||||||
# inventoryInterface = {};
|
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
clan-core.modules.clan.default
|
clan-core.modules.clan.default
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ self, config, ... }:
|
{ self, config, ... }:
|
||||||
{
|
{
|
||||||
flake.flakeModules = {
|
flake.flakeModules = {
|
||||||
clan = import ./clan.nix self;
|
clan = import ./clan.nix self.module.clan.default;
|
||||||
default = config.flake.flakeModules.clan;
|
default = config.flake.flakeModules.clan;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
|
||||||
nix-darwin ? null,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
# Produces the
|
# Produces the
|
||||||
@@ -14,7 +12,6 @@ lib.fix (
|
|||||||
buildClanLib = (
|
buildClanLib = (
|
||||||
clanLib.callLib ./modules {
|
clanLib.callLib ./modules {
|
||||||
clan-core = self;
|
clan-core = self;
|
||||||
inherit nixpkgs nix-darwin;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ rec {
|
|||||||
];
|
];
|
||||||
flake.clanLib = import ./default.nix {
|
flake.clanLib = import ./default.nix {
|
||||||
inherit lib inputs self;
|
inherit lib inputs self;
|
||||||
inherit (inputs) nixpkgs nix-darwin;
|
|
||||||
};
|
};
|
||||||
# TODO: remove this legacy alias
|
# TODO: remove this legacy alias
|
||||||
flake.lib = flake.clanLib;
|
flake.lib = flake.clanLib;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
_module.args = {
|
_module.args = {
|
||||||
inherit clan-core;
|
inherit clan-core;
|
||||||
inherit (clan-core) clanLib;
|
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 = [
|
imports = [
|
||||||
./module.nix
|
./module.nix
|
||||||
|
|||||||
@@ -2,10 +2,8 @@
|
|||||||
## This is only a wrapper such that 'clan' can be called as a function.
|
## This is only a wrapper such that 'clan' can be called as a function.
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
clanLib,
|
|
||||||
clan-core,
|
clan-core,
|
||||||
nixpkgs,
|
...
|
||||||
nix-darwin,
|
|
||||||
}:
|
}:
|
||||||
rec {
|
rec {
|
||||||
buildClan =
|
buildClan =
|
||||||
@@ -18,12 +16,8 @@ rec {
|
|||||||
}@m:
|
}@m:
|
||||||
lib.evalModules {
|
lib.evalModules {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit (clan-core) clanLib;
|
|
||||||
inherit
|
inherit
|
||||||
self
|
self
|
||||||
clan-core
|
|
||||||
nixpkgs
|
|
||||||
nix-darwin
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
|
|||||||
Reference in New Issue
Block a user