forked from pub-solar/os
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; };
|
utils = import ../lib/utils.nix { lib = nixpkgs.lib; };
|
||||||
|
|
||||||
inherit (utils)
|
inherit (utils)
|
||||||
reqImport
|
recImport
|
||||||
vimport
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +23,7 @@ let
|
||||||
system.configurationRevision = flake.rev;
|
system.configurationRevision = flake.rev;
|
||||||
};
|
};
|
||||||
|
|
||||||
local = vimport ./. "${self}.nix";
|
local = import "${toString ./.}/${self}.nix";
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
core
|
core
|
||||||
|
@ -36,6 +35,6 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
hosts =
|
hosts =
|
||||||
reqImport { dir = ./.; _import = config; };
|
recImport { dir = ./.; _import = config; };
|
||||||
in
|
in
|
||||||
hosts
|
hosts
|
||||||
|
|
|
@ -24,11 +24,9 @@ rec {
|
||||||
mapFilterAttrs = seive: f: attrs:
|
mapFilterAttrs = seive: f: attrs:
|
||||||
filterAttrs seive (mapAttrs' f attrs);
|
filterAttrs seive (mapAttrs' f attrs);
|
||||||
|
|
||||||
vimport = path: name: import (path + "/${name}");
|
recImport =
|
||||||
|
|
||||||
reqImport =
|
|
||||||
{ dir
|
{ dir
|
||||||
, _import ? base: vimport dir (base + ".nix")
|
, _import ? base: import "${dir}/${base}.nix"
|
||||||
}:
|
}:
|
||||||
mapFilterAttrs
|
mapFilterAttrs
|
||||||
(_: v: v != null)
|
(_: v: v != null)
|
||||||
|
|
Loading…
Reference in a new issue