fix infinite recursion
This commit is contained in:
committed by
Johannes Kirschbauer
parent
45058ff818
commit
6f1ab30881
@@ -9,7 +9,6 @@
|
||||
{
|
||||
## Inputs
|
||||
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} = { ... }
|
||||
# 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.
|
||||
@@ -26,16 +25,9 @@ let
|
||||
lib
|
||||
nixpkgs
|
||||
clan-core
|
||||
self
|
||||
;
|
||||
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" ];
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
nixpkgs,
|
||||
clan-core,
|
||||
self,
|
||||
directory ? null,
|
||||
specialArgs ? { },
|
||||
}:
|
||||
# Returns a function that takes self, which should point to the directory of the flake
|
||||
@@ -17,7 +16,6 @@ module:
|
||||
module
|
||||
{
|
||||
inherit specialArgs;
|
||||
directory = lib.mkIf (directory != null) directory;
|
||||
}
|
||||
];
|
||||
}).config
|
||||
|
||||
@@ -9,7 +9,7 @@ in
|
||||
{
|
||||
options = {
|
||||
self = lib.mkOption {
|
||||
type = types.raw;
|
||||
type = types.nullOr types.raw;
|
||||
default = self;
|
||||
readOnly = true;
|
||||
defaultText = "Reference to the current flake";
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# NixOS module
|
||||
{
|
||||
config,
|
||||
clan-core,
|
||||
@@ -43,8 +44,7 @@ let
|
||||
# { ${machineName} :: Config }
|
||||
serviceConfigs = (
|
||||
buildInventory {
|
||||
inherit inventory;
|
||||
inherit directory;
|
||||
inherit inventory directory;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user