refactor
This commit is contained in:
parent
f52a8f225b
commit
d7ce40ffa7
14 changed files with 38 additions and 30 deletions
|
|
@ -1,21 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
let
|
||||
walk =
|
||||
path:
|
||||
let
|
||||
dir = builtins.readDir path;
|
||||
in
|
||||
lib.mapAttrs' (name: value: {
|
||||
name = lib.removeSuffix ".nix" name;
|
||||
value =
|
||||
if value == "regular" then
|
||||
import (path + "/${name}")
|
||||
else if value == "directory" then
|
||||
walk (path + "/${name}")
|
||||
else
|
||||
builtins.throw "Cannot handle item of type ${value}";
|
||||
}) dir;
|
||||
|
||||
in
|
||||
walk ./.
|
||||
Loading…
Add table
Add a link
Reference in a new issue