1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-25 00:55:08 +03:00

utils: small cleanup

This commit is contained in:
Timothy DeHerrera 2019-12-21 19:02:22 -07:00
parent 1f55960518
commit e7079c5c63
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
2 changed files with 5 additions and 8 deletions

View File

@ -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

View File

@ -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)