initial commit
This commit is contained in:
commit
c4dc2e0f36
25 changed files with 558 additions and 0 deletions
16
mod/default.nix
Normal file
16
mod/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ 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