utils: small cleanup
This commit is contained in:
parent
1f55960518
commit
e7079c5c63
@ -3,8 +3,7 @@ let
|
||||
utils = import ../lib/utils.nix { lib = nixpkgs.lib; };
|
||||
|
||||
inherit (utils)
|
||||
reqImport
|
||||
vimport
|
||||
recImport
|
||||
;
|
||||
|
||||
|
||||
@ -24,7 +23,7 @@ let
|
||||
system.configurationRevision = flake.rev;
|
||||
};
|
||||
|
||||
local = vimport ./. "${self}.nix";
|
||||
local = import "${toString ./.}/${self}.nix";
|
||||
in
|
||||
[
|
||||
core
|
||||
@ -36,6 +35,6 @@ let
|
||||
};
|
||||
|
||||
hosts =
|
||||
reqImport { dir = ./.; _import = config; };
|
||||
recImport { dir = ./.; _import = config; };
|
||||
in
|
||||
hosts
|
||||
|
@ -24,11 +24,9 @@ rec {
|
||||
mapFilterAttrs = seive: f: attrs:
|
||||
filterAttrs seive (mapAttrs' f attrs);
|
||||
|
||||
vimport = path: name: import (path + "/${name}");
|
||||
|
||||
reqImport =
|
||||
recImport =
|
||||
{ dir
|
||||
, _import ? base: vimport dir (base + ".nix")
|
||||
, _import ? base: import "${dir}/${base}.nix"
|
||||
}:
|
||||
mapFilterAttrs
|
||||
(_: v: v != null)
|
||||
|
Loading…
Reference in New Issue
Block a user