fix infinite recursion
This commit is contained in:
committed by
Johannes Kirschbauer
parent
45058ff818
commit
6f1ab30881
@@ -9,7 +9,6 @@
|
|||||||
{
|
{
|
||||||
## Inputs
|
## Inputs
|
||||||
self ? null, # Reference to the current flake
|
self ? null, # Reference to the current flake
|
||||||
directory ? null, # the directory containing the machines subdirectory. Optional: can be used if the machines is not in the root of the flake
|
|
||||||
# allows to include machine-specific modules i.e. machines.${name} = { ... }
|
# allows to include machine-specific modules i.e. machines.${name} = { ... }
|
||||||
# A map from arch to pkgs, if specified this nixpkgs will be only imported once for each system.
|
# A map from arch to pkgs, if specified this nixpkgs will be only imported once for each system.
|
||||||
# This improves performance, but all nipxkgs.* options will be ignored.
|
# This improves performance, but all nipxkgs.* options will be ignored.
|
||||||
@@ -26,16 +25,9 @@ let
|
|||||||
lib
|
lib
|
||||||
nixpkgs
|
nixpkgs
|
||||||
clan-core
|
clan-core
|
||||||
|
self
|
||||||
;
|
;
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
self =
|
|
||||||
if self == null then
|
|
||||||
lib.warn "The buildClan function requires argument 'self' to be set to the current flake" {
|
|
||||||
inputs = { };
|
|
||||||
}
|
|
||||||
else
|
|
||||||
self;
|
|
||||||
directory = if directory == null then self else directory;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
rest = builtins.removeAttrs attrs [ "specialArgs" ];
|
rest = builtins.removeAttrs attrs [ "specialArgs" ];
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
nixpkgs,
|
nixpkgs,
|
||||||
clan-core,
|
clan-core,
|
||||||
self,
|
self,
|
||||||
directory ? null,
|
|
||||||
specialArgs ? { },
|
specialArgs ? { },
|
||||||
}:
|
}:
|
||||||
# Returns a function that takes self, which should point to the directory of the flake
|
# Returns a function that takes self, which should point to the directory of the flake
|
||||||
@@ -17,7 +16,6 @@ module:
|
|||||||
module
|
module
|
||||||
{
|
{
|
||||||
inherit specialArgs;
|
inherit specialArgs;
|
||||||
directory = lib.mkIf (directory != null) directory;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}).config
|
}).config
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ in
|
|||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
self = lib.mkOption {
|
self = lib.mkOption {
|
||||||
type = types.raw;
|
type = types.nullOr types.raw;
|
||||||
default = self;
|
default = self;
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
defaultText = "Reference to the current flake";
|
defaultText = "Reference to the current flake";
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# NixOS module
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
clan-core,
|
clan-core,
|
||||||
@@ -43,8 +44,7 @@ let
|
|||||||
# { ${machineName} :: Config }
|
# { ${machineName} :: Config }
|
||||||
serviceConfigs = (
|
serviceConfigs = (
|
||||||
buildInventory {
|
buildInventory {
|
||||||
inherit inventory;
|
inherit inventory directory;
|
||||||
inherit directory;
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user